To ensure precise visitor tracking through identity mapping, we advise reviewing your setup in accordance with the guidelines provided in this article. These guidelines help ensure proper connections between anonymous and identified visitor activity before you enable the functionality in your subscription settings.
Consider these recommendations
In addition to the setup steps detailed in this article, consider the following best practices and recommendations for accurate identity mapping:
- Initialize Pendo before users sign in to your app.
- Assign visitors the same Visitor ID across all of your apps within your Pendo subscription.
- Ensure a consistent Visitor ID across domains and apps.
- If your apps are on different domains or if sharing cookies across subdomains isn't an option, ensure that it’s possible for visitors to sign in to each app (with a consistent Visitor ID) so that we can automatically identify and merge usage.
- It’s important that visitors are mapped to a single Visitor ID across each domain because we don’t currently support manual merging of Visitor IDs.
- Encourage visitors to allow cookies if tracking anonymous usage across subdomains, and advise against regularly clearing their local storage.
Initialize Pendo for anonymous visitors
The initial step for identifying anonymous visitors involves calling pendo.initialize()
while the user is anonymous. This action generates an anonymous Visitor ID that forms the basis for effective tracking.
If you aren't initializing Pendo prior to visitors signing up or in to your app, see our guidelines to Install Pendo on a single-page web application and Install Pendo on a multi-page web application and update your install script accordingly.
Preserve anonymous Visitor IDs
To ensure all anonymous events are mapped at the time of visitor identification, follow these steps to maintain a consistent anonymous Visitor ID based on your use case:
-
Preserve anonymous Visitor IDs across subdomains. Cookies are required to automatically persist an anonymous Visitor ID across subdomains. To enable cookies for a Pendo application, a Pendo admin can either set the cookie domain in your application settings or pass a
cookieDomain
field directly in your install script. For instructions, see Track anonymous visitors across subdomains or apps. - Preserve anonymous Visitor IDs across apps. To do this, a Pendo admin must turn on the Enable cross-app agent cookies and local storage application setting for each app. This ensures that the anonymous Visitor ID remains consistent across different apps within the same domain. This setting often aligns with the guidelines for preserving anonymous Visitor IDs across subdomains, as each subdomain is typically set up as a separate app in Pendo. For more information, see Track anonymous visitors across subdomains or apps.
-
Preserve anonymous Visitor IDs across domains. This requires additional setup since Pendo doesn't support this by default. Your development team must create a solution for passing the anonymous Visitor ID across domains. After the visitor is on the new domain, call
pendo.initialize
with the anonymous Visitor ID.
For all use cases, it's important to ensure that the anonymous Visitor ID is known to the Pendo agent (and present as local browser data through cookies or local storage) before identifying the visitor at the time of signing up or in to your application.
Check your agent and mobile SDK versions
To ensure the latest functionality and optimizations for identity mapping, we strongly recommend using the latest agent version. At a minimum, your app should be on version 2.237.2.
For identifying anonymous activities in your mobile apps, you must use SDK version 3.1.0 or above.