Track Users
Understand your users’ complete journey by connecting their interactions across different devices and sessions. By implementing the identify API, move beyond cookie limitations and gain a unified view of individual user behavior:
-
Holistic user understanding: link user activity across desktops, mobile devices, and over time, providing a true, unified view of their digital experience.
-
Enriched analysis & segmentation: associate your internal user identifiers (like user IDs, hashed emails, account IDs) with Contentsquare’s rich behavioral data. This allows for deeper segmentation and analysis based on your known user attributes.
-
Audience activation: connect Contentsquare’s behavioral insights with your CRM, marketing automation, and other tools by using a consistent user identity across all your tools. This enables precise and effective audience targeting.
-
Privacy-focused flexibility: you have control over the user identities you send. Use UUIDs, hashed emails, or other data to maintain users’ privacy while still achieving a unified view.
Why use Identify?
Section titled Why use Identify?Imagine a user who starts a session on your website using their laptop, then switches to their mobile device.
Without identify
Contentsquare sees two separate users. Analysis of their complete journey is impossible.
With identify
You use the identify API with their user identity (for example, their UUID from your CRM). Contentsquare links their activity on both the laptop and the mobile to their identity, providing a complete picture of their behavior.
Identifying users
Section titled Identifying usersThe identify
command associates the current user with a unique identifier you provide.
window._uxa.push(["identify", <identityString>, <options>]);
For example, you can identify users with:
-
A User ID from your CRM
<script type="text/javascript">window._uxa = window._uxa || [];// crmUserID = 145612124window._uxa.push(["identify", crmUserID]);</script> -
A hashed user email address
<script type="text/javascript">window._uxa = window._uxa || [];// hashedEmail = bfuKr7A9WgrhAgm2:C2YFJWcfN1yXzUnPfMrv6JivXJvYw==window._uxa.push(["identify", hashedEmail]);</script>
Best practices
Section titled Best practicesBe mindful of user privacy and avoid directly identifying identifiers such as name, surname, email addresses but instead to use identifiers such as Customer number, UUID, and so on.
If an identifier is directly identifying a data subject, the identify
command provides a way to hash the identity string client-side, using the { hash: true }
option.
<script type="text/javascript"> window._uxa = window._uxa || [];
window._uxa.push(["identify", emailAddress, { hash: true }]);</script>
While hashing client-side provides an extra layer of privacy, it’s crucial to understand that Contentsquare will store the hashed value, which will not match the original identifiers in your CRM, marketing platform, and so on.
This makes it significantly more difficult to:
- Join Contentsquare data with data from those systems for comprehensive analysis,
- Activate Contentsquare audiences in external platforms for targeted campaigns.
In most cases, you should send an identifier available in your other tools to maximize data integration and activation capabilities.
For enhanced control and consistency, perform hashing on your server-side or within a centralized data processing pipeline, rather than relying on the client-side { hash: true }
option.
This approach ensures that hashing is applied uniformly across all data sources and allows you to manage the hashing process according to your specific security and data governance policies.
Related identity commands
Section titled Related identity commandsresetIdentity
Removes any currently associated identity string from the user. This also resets the current session and generate a new anonymous user ID.
window._uxa.push(["resetIdentity"]);
getIdentity
Checks if the current user has an identity string associated with them. It does not return the exact identity string but a hash of it.
window._uxa.push(["getIdentity"]);
Adding user properties
Section titled Adding user propertiesThe addUserProperties
command associates the current user with the given custom properties, overwriting any previously set values for these properties.
<script type="text/javascript"> window._uxa = window._uxa || [];
// hashedEmail = bfuKr7A9WgrhAgm2:C2YFJWcfN1yXzUnPfMrv6JivXJvYw== window._uxa.push(["identify", hashedEmail]);
// userProperties = { "accountType": "Premium", "membershipLevel": 3 } window._uxa.push(["addUserProperties", userProperties]);</script>
Next steps
Section titled Next stepsBy using the identify API, you unlock a deeper understanding of your users and their digital experiences.
Once you’ve implemented the identify API, you can leverage the associated user data for:
- Creating advanced segments in Contentsquare based on your user attributes,
- Analyzing user journeys across different devices,
- Integrating Contentsquare insights with your other business intelligence tools or audience activation tools.