Skip to content

Using Custom Dimensions

Martin Treacy-Schwartz edited this page Apr 6, 2017 · 6 revisions

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 these event categories.

  • Business
  • Resource
  • Progression

Setting each custom dimension. To reset a set custom dimension simply just set it to empty string.

<!-- Traditional way -->
gameanalytics.GameAnalytics.setCustomDimension01("ninja");
gameanalytics.GameAnalytics.setCustomDimension02("dolphin");
gameanalytics.GameAnalytics.setCustomDimension03("horde");

<!-- reset custom dimension 3 -->
gameanalytics.GameAnalytics.setCustomDimension03("");

<!-- Command queue -->
GameAnalytics("setCustomDimension01", "ninja");
GameAnalytics("setCustomDimension02", "dolphin");
GameAnalytics("setCustomDimension03", "horde");

<!-- reset custom dimension 3 -->
GameAnalytics("setCustomDimension03", "");
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.

 

NEXT  →

Clone this wiki locally