Tracking anonymous visitors across subdomains

Last Updated:

Using anonymous Visitor IDs in Pendo allows you to track the activity of users while keeping the identity of those visitors anonymous. For more information about anonymous visitors, see the Anonymous Visitors article.

If you're using anonymous Visitor IDs and a visitor moves between subdomains, you can adjust the install script for your Pendo subscription to ensure that the same anonymous Visitor ID is used on both subdomains. 

For example, you might want to know when the same anonymous visitor first visits blog.example.com and then visits support.example.com/. You can do this by implementing the cookieDomain setting in your install script.

  1. In Pendo, navigate to Settings > Subscription Settings Install Settings.
  2. Hover over over your application and select View App Details.
  3. Open the Install Settings tab at the top of the page.
  4. Add cookieDomain: '.example.com' to the pendo.initialize() function in the install script. This allows you to use the same cookie to track the anonymous visitor on all of the example.com subdomains.
  5. Open the App Details tab at the top of the page.
  6. Ensure that the following options aren't selected. If either of these settings are selected, the cookieDomain setting doesn't work correctly:
    • Disable client-side storage (Agent cookies and local storage)
    • Prevent the web agent from using cookies when local storage is not available

For more information about the install script and the initialize function, see the Developer's guide to installing Pendo.