There is an ability to fill key-value pairs in special offers campaign’s settings, getting of these values through SDK’s API on a game’s side and using them inner the game. Game developers need to use this ability only if any additional customization of a reaction to a special offer's is needed on the game-side. For example, a developer want to show some special offers on special place inner the game. He can send the information about the place through special offer custom data and analyse it on the game's side.
Game of Whales supports the following types of data:
- String (max lenght is 4096 symbols)
Game of Whales doesn't support arrays or lists of values in custom data.
You can't add more that 50 key-value pairs.
Custom data is specified on the special offer card. So do the following steps for setting it:
- Open the special offer's card.
- Click on Custom Data option.
- Custom Data form will be opened. Specify the type of data (1), a key name (2) and a value (3). Than click on +ADD PAIR (4).
- The pair will be added to Custom JSON field.
- Add other pairs by using the row at the top of the form.
- If you need to edit or delete any pair click on it in Custom JSON field. It will be shown in the row at the top of the form and you can edit or remove the pair by using the appropriate buttons near the row.
- In order to finish the data editing click on SAVE and then save the special offer.
You can import JSON to the custom data by using IMPORT JSON button on Custom Data form: just paste your JSON to Import JSON form, click on IMPORT, than save the custom data and save the offer.
If the special offer campaing contains any custom data the Custom Data option on the special offer's card is green.
To edit the custom data click on Custom Data option. Custom Data form will be opened. Edit your data, than click on SAVE button and than save the offer.
In order to clear the data click on CLEAR JSON button on Custom Data form, than click on SAVE button and than save the offer.
Custom data can be edited or removed only for offers with Draft state.
How to get custom data on the game's side?
In order to get custom data on the game's side, you can use SpecialOffer.customValues property:
public Dictionary<string,object> customValues
where string is a key, object is a value.