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.

const userData = {userId:"userId123", attributes:{"b":"c"}};
NotifyVisitors.userIdentifier(userData);

//Example
const userData = { userId: "userId123", attributes: { b: "c" } };
NotifyVisitors.userIdentifier(userData);

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 KeyAttribute ValueAttribute description
user_idstring
namestring
first_namestring
last_namestring
emailstringEmail ID
mobilestringPhone number of the user in E.164 format
eg. +551155256325, +917850009678
birth_dateDateBirth date in YYYY-MM-DD format
genderstringGender - value can only be one of male, female, other
email_opt_ininteger1 -> reachable on email 0 -> not available , 2 -> bounced
sms_opt_ininteger1 -> reachable on sms , 0 -> not available , 2 -> invalid
whatsapp_opt_ininteger1 -> opt in for whatsapp , 0 -> no, 2 -> invalid
hashed_emailstringEncrypted email address for use with a private ESP
hashed_mobilestringEncrypted phone number for use with a private ESP

Setting System Attribute

Name

const userData = {userId:"1331", attributes:{name:"John"}};
NotifyVisitors.userIdentifier(userData);

Email

const userData = {userId:"1331", attributes:{email:"[email protected]"}};
NotifyVisitors.userIdentifier(userData);

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.

const userData = {userId:"1331", attributes:{hashed_email:"144e0424883546e07dcd727057fd3b62"}};
NotifyVisitors.userIdentifier(userData);

Mobile No

const userData = {userId:"1331", attributes:{mobile:"+919999999999"}};
NotifyVisitors.userIdentifier(userData);

Birth Date (in YYYY-MM-DD format)

const userData = {userId:"1331", attributes:{birth_date:"1986-08-19"}};
NotifyVisitors.userIdentifier(userData);

Opt-In Status

  • Set subscription preference of your users for:
  1. SMS
  2. Email
  3. WhatsApp 

Use the following methods:

const userData = {userId:"1331", attributes:{whatsapp_opt_in:"1"}};
NotifyVisitors.userIdentifier(userData);
  • 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 :

const userData = {userId:"1331", attributes:{
  name:"John",
  email:"[email protected]",
  mobile:"+919999999999",
  birth_date:"1986-08-19",
  user_score:"340",
  plan_type:"3" }};
NotifyVisitors.userIdentifier(userData);

Important Points :

  1. Values of an attribute can have only one of the following data types:Boolean, Number, String, Date, Map and Array.
  2. There are a maximum of 25 custom attributes per datatype. For example, 25 custom attributes of Number data type and 25 custom attributes of String data type etc.
  3. The maximum length of a String data type for an attribute is 1000 characters.
  4. The maximum length of an attribute Key is 50 characters.
  5. 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
const userData = {userId:"1331", attributes:{
  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"
	}
}};
NotifyVisitors.userIdentifier(userData);