User Information - GameAnalytics/GA-SDK-CPP GitHub Wiki

During the game it is possible to set information about your users that will then be annotated to all other events.

  • gender
  • Facebook ID
  • birthyear (age)

:information_source:
These user values will persist cross session/game-launch. Set them to nil to reset.

 

Set gender.

gameanalytics::GameAnalytics::setGender(gameanalytics::EGAGender::Female);

Set birthyear.

gameanalytics::GameAnalytics::setBirthYear(1980);

Set Facebook ID.

gameanalytics::GameAnalytics::setFacebookId("123456789012345");

 

Field Type Description Example
gender string Gender of player. gameanalytics::EGAGender::Female, gameanalytics::EGAGender::Male
birthYear integer The year the player was born. 1980
facebookId string Facebook Id of the player. 123456789012345

 

NEXT  →