User profiling for web apps
Apptics allows you to associate the tracking data with a user id of an individual using your app. Setting a user id is not mandatory for Apptics to work as desired.
Setting the user ID
All the data tracked after calling the below method will be associated with the given user id, with respect to the current Apptics tracking state.
Copiedapptics.setUser(userid, groupid, jsonObj);
**`userid` (string) - Mandatory**. This is the unique identifier for the user.
**`groupid` (string) - Mandatory**. This will be the group or organization ID to which the user belongs.
**`jsonObj` (Object) - Optional**. This will be the additional user data in the JSON format.
Example
The below example will set the user ID as 'user123' and associate them to the 'group456' organization with additional details about their subscription plans.
Copiedapptics.setUser('user123', 'group456', { plan: 'Premium' });