Tracking Users
Track Users activity through NotifyVisitors
NotifyVisitors starts to detect users right after you integrate your app platform through our SDKs. Hereafter, you can assign a unique User ID to every user to identify them.
Notifyvisitors.userIdentifier((String) userID, (jsonObject) userAttributes);
// Example
var attributes = {"name":"neeraj","firstCategory":"standard","secondCategory":"fancy"};
Notifyvisitors.userIdentifier("neeraj",attributes);
Benefits
- You can add more information to your NotifyVisitors User Profile and create a user segment for different categories of people with specific profile properties predefined by you.
- You can build new campaigns to engage your users for each segment that you create.
- Secondly, by adding more info to your NotifyVisitors User Profile you can personalize your messaging for the campaigns with related information.
- The third benefit includes personalizing your app created from information from the specific user's NotifyVisitors User Profile.
User ID
It is important to set a unique ID so you can easily identify users across different devices. You can identify them whether the users install or uninstall your website or app across different platforms-
- Android
- iOS
- Windows
- The Web
- ID that is backend-generated
Guidelines
- All APIs related to users are a part of NotifyVisitors’ user object of the Android SDK
- You cannot change your assigned user ID
- You cannot change your assigned user ID
- The maximum number of characters allowed in making your user ID has to be under 100 characters
- User ID cannot be changed further once established. A unique ID means having a distinctive user identity.
User Attributes
User Attribute are Attributes related to the user profile as follows:
- User's name
- Email address
- Location
There are two types of User Attributes:
- System User Attributes
- Custom User Attributes
Both attributes are tracked for known users and anonymous users
System User Attributes
System user attributes are the attributes that are passed by you and recognized by Notifyvisitors system.
Guidelines
- NotifyVisitors’ allows professionals to assign values to all attributes for your app users.
- System User Attributes cannot be used for segmenting the users.
- You can use the attributes to configure personalize messages.
- They are better than event attributes which may take different values in every session
- Record details using User attributes as they do not change and their details are the same throughout one session.
Look at the below table to refer to the system attributes :
Attribute Key | Attribute Value | Attribute description |
---|---|---|
user_id | string | |
name | string | |
first_name | string | |
last_name | string | |
string | Email ID | |
mobile | string | Phone number of the user in E.164 format eg. +551155256325, +917850009678 |
birth_date | Date | Birth date in YYYY-MM-DD format |
gender | string | Gender - value can only be one of male, female, other |
email_opt_in | integer | 1 -> reachable on email 0 -> not available , 2 -> bounced |
sms_opt_in | integer | 1 -> reachable on sms , 0 -> not available , 2 -> invalid |
whatsapp_opt_in | integer | 1 -> opt in for whatsapp , 0 -> no, 2 -> invalid |
hashed_email | string | Encrypted email address for use with a private ESP |
hashed_mobile | string | Encrypted phone number for use with a private ESP |
Setting System Attribute
Name
Notifyvisitors.userIdentifier("1331", {name:"John"});
Notifyvisitors.userIdentifier("1331", {email:"[email protected]"});
Hashed Email
Businesses do not like to share their users’ contact details with a third party platform
like Notifyvisitors. So we have provided you to pass encrypted email IDs in the
system user attribute.
Notifyvisitors.userIdentifier("1331", {hashed_email:"144e0424883546e07dcd727057fd3b62"});
Mobile No
Notifyvisitors.userIdentifier("1331", {mobile:"+919999999999"});
Birth Date (in YYYY-MM-DD format)
Notifyvisitors.userIdentifier("1331", {birth_date:"1986-08-19"});
Opt-In Status
- Set subscription preference of your users for:
- SMS
Use the following methods:
Notifyvisitors.userIdentifier("1331", {whatsapp_opt_in:"1"});
- Those user who have shared their phone number and email address and automatically opted in to SMS and Email respectively.
- By default the WhatsApp opt-in setting is false. When the users decide to opt-in to channel you would have to set it to true
- If the Users happen to opt-out of a channel, they will stop receiving and communications through that specific channel.
Custom Attributes
Custom attributes are the additional details passed by you for users . You can pass the user system attributes like name, email, mobile and whatsapp_opt_in in and,
Custom attributes like user__score, plan_type etc as given below :
Notifyvisitors.userIdentifier("1331", {
name:"John",
email:"[email protected]",
mobile:"+919999999999",
birth_date:"1986-08-19",
user_score:"340",
plan_type:"3" }
);
Important Points :
- Values of an attribute can have only one of the following data types:
Boolean
,Number
,String
,Date
,Map
andArray
. - There are a maximum of 25 custom attributes per datatype. For example, 25 custom attributes of
Number
data type and 25 custom attributes ofString
data type etc. - The maximum length of a
String
data type for an attribute is 1000 characters. - The maximum length of an attribute Key is 50 characters.
- Attribute Names should contain only alpha-numeric, white spaces or "" ; No other special characters are allowed. Recommended names should be - ‘first name’, ‘last_name’
Complex Attributes
Your user details may have more complex info like
- Array
- objects
Notifyvisitors.userIdentifier("1331", {
name:"John",
email:"[email protected]",
mobile:"+919999999999",
birth_date:"1986-08-19",
user_score:"340",
plan_type:"3",
address:{
"Flat" : "h-3/94",
"Building Number" : "B2",
"Locality" : "Bengali Road",
"City" : "Palam",
"State" : "Delhi",
"PIN" : "110045"
}
});
Updated 2 months ago