If a user visiting your app hasn’t been identified (for example, by signing in) they’re categorized as an anonymous visitor. Pendo saves and tracks anonymous visitors at the browser level using client-side data, like local storage and cookies.
With identity mapping, Pendo merges anonymous and identified Visitor IDs for a unified view of user journeys so that you can view the connected data in Pendo.
This article reviews what identity mapping is, how it works with the Pendo agent, and where you can view connected visitor data in the Pendo UI. For information on proper setup for identity mapping, see Identity mapping checklist.
What identity mapping is
Identity mapping links the activities performed by a visitor before they signed in to your app with the activities they performed as an identified visitor. For example, you might have a user who visits your marketing page and signs up on your website later that day.
Without identity mapping, Pendo maintains two separate Visitor IDs for the same user:
- An anonymous Visitor ID for all pre-login activities.
- An identified Visitor ID for all post-login activities.
These two IDs remain distinct, resulting in separate records for the same user and a fragmented view of their journey.
With identity mapping, Pendo merges the anonymous Visitor ID with the identified Visitor ID after the user signs in to your app. This integration consolidates the two IDs into a single visitor record, ensuring a holistic and comprehensive understanding of the user's journey.
How identity mapping works
When a visitor interacts with your app, whether they’re anonymous or identified, the Pendo agent captures a variety of events based on user activity.
One important event, the “identify” event, occurs when a previously anonymous visitor is identified by your app. This identification can happen by providing the visitor configuration object to pendo.initialize()
or by using pendo.identify()
, depending on how your app and install script is configured.
The Pendo identify event contains an “old_visitor_id” property, which the agent captures based on client-side data. For example, if the visitor previously had an anonymous Visitor ID of “_PENDO_T_12345”, the identify event payload would look something like this (with some properties removed for simplicity):
//properties removed for simplification
{
"props": {
"account_id": "New Account",
"old_account_id": "",
"old_visitor_id": "_PENDO_T_12345",
"visitor_id": "New Visitor"
},
"type": "identify",
"url": "https://crm.pendoexperience.io/",
"visitor_id": "New Visitor",
"id": "qp7C0c0pXMJ6tqfZ2MwXLo3rpW_3M_ESjWK5rMbxGZ8",
"appId": -323232,
"browserSentTime": 1700165556840,
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)"
}
To combine these Visitor IDs, Pendo uses the “old_visitor_id” property and automatically merges visitor records when the old Visitor ID is anonymous (starting with “_PENDO_T_”) and the “new” Visitor ID is identified. This automatic merging occurs nightly every 24 hours.
When this data merging occurs, Pendo:
- Replaces undefined metadata fields for the identified visitor with any custom or agent metadata values associated from their anonymous state, as long as those fields aren't enabled as historical.
- Updates the First Visit field if the anonymous visitor's first visit to your app occurred before their first identified visit.
- Adds a new First Identified Visit field to the identified visitor.
Anonymous return visits
If an anonymous visitor returns to your app, Pendo attempts to use the same anonymous Visitor ID for them. However, if the saved anonymous ID is inaccessible due to cleared browser cookies or a visit from a new browser or device, a new anonymous Visitor ID is generated. This means that a single visitor can have multiple anonymous Visitor IDs.
Important: Only anonymous Visitor IDs that are present at the time of login or the identify event will have their events mapped to the identified Visitor ID. If the anonymous Visitor ID was cleared or inaccessible at the time of login or the identify event, Pendo can't merge the events associated with different anonymous Visitor IDs.
Pendo can merge multiple anonymous Visitor IDs with a single identified Visitor ID as long as they sign in to your app in the browser where they were originally anonymous. While searching for events related to multiple anonymous Visitor IDs, Pendo looks for corresponding IDs up to 90 days before their first identified visit.
Anonymous visits from multiple devices
If a single user visits your app on two different devices, we merge the anonymous and identified activities after the visitor signs in on each device.
Anonymous visits in multiple apps
If a user visits two of your apps that share domains and cross-app cookies are turned on, we maintain the same anonymous Visitor ID. After the visitor signs in on one of those apps, we merge their anonymous and identified activities.
If the subdomains don’t share cookies, Pendo can’t merge the anonymous and identified activities, treating the subdomains as separate domains. For information on setting up your cookie domain and cross-app cookies, see Track anonymous visitors across subdomains.
If a user visits two apps on separate domains with distinct logins, we can still merge anonymous and identified activities after the user signs in to each app. The visitor must have the same Visitor ID in both apps for all activities to merge under a single Visitor ID after signing in.
In a more complicated scenario where a visitor navigates between three different apps across two distinct domains, each app has shared cookies turned on. A consistent Visitor ID mapping is implemented across these apps.
When the visitor engages with the two apps on a shared domain, Pendo maintains a single anonymous Visitor ID. After signing in on one of those apps, Pendo merges the anonymous and identified activities. After the user visits the app that’s on a separate domain, Pendo creates a new anonymous Visitor ID. However, after they sign in to that third app, Pendo merges this activity with the identified user.
Multiple identify events within an hour
If Pendo receives multiple identify events within the same hour, we only log the first identify event. For example, if a visitor duplicates a tab and signs in using two different Visitor IDs from the two tabs, we only take the first login in to account.
Enable identity mapping
Before you can connect anonymous and identified activity, a Pendo admin must enable identity mapping for your subscription using the following steps:
- Navigate to Settings > Subscription Settings.
- In the Information section, turn on Anonymous visitor tracking. If you don't see this option, contact your Pendo account representative to gain access.
View connected data
After you turn on identity mapping for your subscription, you can view the automatic display of connected data throughout Pendo. This connected data is mapped nightly every 24 hours and encompasses visitor activities from both anonymous and identified states.
When mapping occurs, the data for all activities generated 30 days prior to the mapping date become associated with the identified visitor. This merging of activities adds two components to the anonymous visitor's details page:
- Under Details > Agent, the Mapped ID field displays the Visitor ID of the identified visitor and the merge date.
- At the top of the page, you can find a note that states "Activities since [30 days prior to the merge date] are now associated with the identified visitor", along with a link to the identified visitor's details page.
This data merging also:
- Replaces undefined metadata fields for the identified visitor with any custom or agent metadata values associated from their anonymous state.
- Updates the First Visit field if the anonymous visitor's first visit to your app occurred before their first identified visit.
- Adds a new First Identified Visit field to the identified visitor.
You can view which activities occurred while a visitor was anonymous in the visitor activity log, as well as in path reports.
- When viewing the details page for a specific visitor, select View Activity to open the visitor activity log. Anonymous activities are indicated by a gray Anonymous label.
-
When selecting a path step, refer to the Was anonymous? column in the breakdown table to understand whether a visitor was anonymous at the time they generated the corresponding event.
Note: If you're not seeing the data you expect, we recommend evaluating your setup with our Identity mapping checklist and contacting Pendo Support if your setup looks correct.