User Properties
Configure user tracking by setting user-level properties, unique user IDs, and custom parameters via the iOS User Properties documentation to enable detailed analytics in the Tapjoy dashboard.
Read time 2 minutesLast updated 3 hours ago
By setting various user properties, such as level, and ID, you can automatically get powerful analytics insights from the Tapjoy dashboard. For example, by setting user level whenever your user gains or passes level, you can get a picture of how your users are distributed throughout the levels of your game:
[Tapjoy setUserLevel:1]; // Set the user level to 1
This will let you see charts in the "Game Trend" section of the Analytics dashboard.Tapjoy.setUserLevel(1) // Set the user level to 1
User ID
You can set a user ID.
The Tapjoy SDK will automatically generate a user ID for you. But there are certain situations in which you will want to specify your own user ID:
- If you are using Tapjoy with self-managed currency, you must specify a user ID. This is so that when Tapjoy’s server sends your server a message that a user has earned some currency, it knows which user to identify as the recipient.
- If you are using managed currency and want your users to be able to keep their currency balance across multiple devices, then you must specify your own user ID, and make sure it is the same across all devices for a given user.
If you need to set a user ID, you can do so with the following code (no dashboard setting is necessary):
[Tapjoy setUserID:@"A_UNIQUE_USER_ID"];
If you want to check the user ID there is a getter available:Tapjoy.setUserID("A_UNIQUE_USER_ID")
NSString *userID = [Tapjoy getUserID];
let userID = Tapjoy.userID
Custom Parameters
You can set custom parameters like so:[Tapjoy setCustomParameter:@"[PARAMETER]"];
Contact support for more information on this.Tapjoy.setCustomParameter("[PARAMETER]")
Notes
- Call only once when an initialization or changes of user level happens.
setUserLevel
- To reset level information, send negative integer instead of level.
[Tapjoy setUserLevel:-1];