User Properties
Define user properties such as level, user ID, or other attributes in Flutter to enable detailed analytics and behavior tracking within the Tapjoy dashboard.
Read time 1 minuteLast 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 Tapjoy.getUserLevel(); // Get the user level
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(userId: 'userId', onSetUserIDSuccess: () => {}, onSetUserIDFailure: (error) => {} ); Tapjoy.getUserID();