Tracking Users
Last updated
Last updated
Must Read
We recommend that you get acquainted with all the concepts related to and before proceeding. Doing so will help you understand the workings of this section, better.
At Antsomi, user tracking begins immediately upon the integration of our SDKs into your platform. As users visit your website, the Antsomi SDK seamlessly assigns a unique ID, known as a UID (User ID), creating an anonymous profile in our backend system. This profile is a repository for all behavioral data and session information, including System Events, Custom Events, System User Attributes, and Custom User Attributes.
To establish a more concrete connection between a user and a customer, you have the option to assign a CID (Customer ID) at pivotal moments in the user's journey:
Upon user signup.
During user login.
When the user's identity becomes known, such as specific page views or interactions.
Assigning a CID holds several crucial implications:
Marks the user as identified and recognized as a "Customer" in your CDP365 dashboard.
Initiates the creation of a new "Customer Profile" containing all user data, even if no prior profiles exist for that CID in CDP365.
Merges all previous anonymous profiles associated with the user into this new "Customer Profile," providing a unified view of the user's interactions across your platform.
When assigning a Customer ID (CID) to identify your users, consider the following:
A customer ID cannot be changed once assigned.
For enhanced security and uniqueness, it is advisable to use hashing methods (e.g., MD5 or SHA256) with user-specific information like email addresses or phone numbers.
To allocate a customer identification (CID), use the following code snippet. Any attributes, events, or session data collected before using this API are initially linked to an automatically generated anonymous user. Upon calling this custom implementation, all previously stored information becomes associated with the identified customer.
In scenarios where users might not explicitly log in during each session but maintain an active login session, it's crucial to identify them at strategic intervals to ensure accurate customer information capture. The identify_user
event serves this purpose and is typically called once per day to update customer data.
Ensure you call web_event.resetAnonymousUId()
when the logged-in customer logs out or when you do not want to attach any future event, session, or user data with this customer until the user signs in again.
Antsomi allows you to associate additional details such as name, email address, location, and more with your customer profiles. For example, in the sign-in event code snippet above, you can send more attributes beside customer_id
and name
, like the code snippet below