Skip to main content

Tracking User Details

Tracking User Profile Attributes

You can track a user’s profile attributes e.g., profileName, email etc.

To do this add the following code:

HashMap<String, String> userProfile = new HashMap<>();
userProfile.put("userAvatarURL", "avatar.jpeg");
userProfile.put("profileName","Bob");
userProfile.put("email", "bob@mail.com");
userProfile.put("phoneNumber", "555-3982");
userProfile.put("country", "US");

Wappier.getInstance().trackUserProfile(userProfile);
note

You can use any number of attribute keys and values. User Profile attributes will be associated with the user’s document.

Adding or Removing tags from a User

Tags are associated with the user’s document and can be used for segmentation, targeting, and analytics. You can use any string as a tag.

To add or remove tags from a user, add the following code:

Wappier.getInstance().addTag("tag");

Wappier.getInstance().removeTag("tag");

Adding or Removing Key-Value pairs from a User

The Key-Value Pairs are associated with the user’s document and can be used for segmentation, targeting, and analytics.

To add or remove one or multiple Key-Value pair(s) from a user add the following code:

Wappier.getInstance().trackKVP("key","value");
or
HashMap<String, String> kvpMap = new HashMap<>();
kvpMap.put("key1","value1");
kvpMap.put("key2","value2");
kvpMap.put("key3","value3");

Wappier.getInstance().trackKVP(kvpMap);
tip

The KVPs can be also sent as part of the startSession