Using anonymous Visitor IDs in Pendo allows you to track the activity of users while keeping their identities anonymous. If a visitor navigates between subdomains or apps, you can update your application settings to ensure that the same anonymous Visitor ID is used on each subdomain or app.
For example, you might want to know when the same anonymous visitor first visits app.example.com
and then visits support.example.com
. You can use a visitor's local browser data to track the anonymous visitor on each example.com
subdomain by defining a cookie domain.
If these subdomains are set up as different apps in Pendo, you should also enable cross-app local browser data to persist a single Visitor ID across each app.
Note: If a visitor has cookies turned off or your app is set up as local storage only, we can't track them across subdomains.
Use cases
Sharing local browser data (cookies and local storage) across subdomains or apps ensures that anonymous Visitor IDs remain consistent. We recommend sharing this when you want to track anonymous visitors across multiple subdomains, or multiple apps within the same domain.
While sharing local browser data is required for identity management to connect anonymous and identified visitor activity across subdomains or apps that don’t have separate logins, this is also useful regardless of whether you have identity management enabled.
For instance, if you have a marketing site and a support site that don't require login, sharing local browser data lets you see the same anonymous visitor activities across both sites instead of generating two separate anonymous Visitor IDs.
Track visitors across subdomains
Configuring a cookie domain in Pendo or directly in your app turns on cookies so that we can track visitors across subdomains. Otherwise, we default to local storage.
There are two options for configuring domain cookies to set up cross-subdomain tracking: updating your install script or your application settings.
Prerequisites
Regardless of which method you choose for configuring domain cookies, a Pendo admin must ensure that local browser data is accessible to Pendo.
- Navigate to Settings > Subscription Settings in Pendo.
- Select the Applications tab, then find and open the relevant app from your Applications list.
- Within the App Details tab, find the Cookies and data privacy section.
- Ensure the following settings are turned off. If either of these settings are turned on, cookies won't work as expected:
- Disable client-side storage
- Don't use cookies when local storage is unavailable
After you ensure these two settings are turned off, you can proceed with turning on cookies with your desired method.
Update install script
If you opt for updating your install script to implement domain cookies, what's defined in the install script takes precedence over what's defined in your application settings.
This method requires development work and is necessary if your cookie domain needs to be dynamic. For example, you might have a white-labeled application where every customer has a different domain. In this case, you'd need to adjust the install script in your application since you can only define a static domain in your application settings.
To do this, ask a developer to update your install script by adding cookieDomain: 'example.com'
to the pendo.initialize()
function, replacing .example.com with the appropriate domain.
Note: For more information about the install script and the initialize function, see the Developer's guide to implementing Pendo using the install script.
Update application settings
Updating your application settings in the Pendo UI is the easiest and most common way to implement domain cookies. You must be a Pendo admin to access your application settings. If you're still in your application settings from fulfilling the prerequisites, skip to step 4.
- Navigate to Settings > Subscription Settings in Pendo.
- Select the Applications tab, then find and open the relevant app from your Applications list.
- Within the App Details tab, find the Cookies and data privacy section.
- For Cookie domain, select the blue text located to the right of the setting (this reads Not set if you don't have a domain configured already), and enter the domain you'd like to enable agent cookies in.
- Select < Back to Applications to return to your list of applications, then repeat these steps for each app as needed.
Track visitors across apps
If the subdomains you want to track visitors across are set up as different apps in Pendo, you must enable cross-app agent cookies and local storage to persist a single Visitor ID across each app. To do this, a Pendo admin can use the following steps.
If you're still in your application settings from implement domain cookies, skip to step 4.
- Navigate to Settings > Subscription Settings in Pendo.
- Select the Applications tab, then find and open the relevant app from your Applications list.
- Within the App Details tab, find the Cookies and data privacy section.
- If you want to track anonymous visitors across apps within the same domain, ensure that the Enable cross-app agent cookies and local storage setting is selected.
- Select < Back to Applications to return to your list of applications, then repeat these steps for each app as needed.
Note: This setting isn't currently available for extension apps.