Game Ops
Remote Configs
To manually check if Remote Configs is ready (has been populated with values) you can call this:
Remember the remote configs can be populated with an empty dictionary if the device is offline and there are no cached remote configs from a previous session.
To get values out of a populated Remote Configs use the following methods:
If the specified key is not found in the Remote Configs it will return the default value either “normal” or “custom” default value.
For Cordova export
If you need to use configs in a Cordova export project you need to use callback functions to get the return value as the this asynchronous:
The function name parameter belongs to the Is RC ready conditions which is hidden on the picture but you just need to edit it to show it.
The callback functions can of course be called something else than in the example.
Custom Dimensions
GameAnalytics support the use of 3 custom dimensions.
- Custom01
- Custom02
- Custom03
During the game it is possible to set the active value for each custom dimension dynamically. Once a dimension is set it will be persisted across sessions/game-start and automatically be added to all event categories. Remember you have to set the custom dimensions before initialzing the SDK (but after setting the available custom dimensions) to be able to add the dimensions to the first session start event.
Setting each custom dimension. To reset a set custom dimension simply just set it to empty string.
Field | Type | Description | Example |
---|---|---|---|
customDimension | string | One of the available dimension values set in the configuration phase. Will persist cross session. Set to empty string to reset. | ninja |
Read more about Custom Dimensions here.