Track 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. If you're using anonymous Visitor IDs and a visitor navigates between subdomains, you can update your app settings 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 use the same cookie to track the anonymous visitor on all of the example.com subdomains by defining a cookie domain in your app settings.

Alternatively, you can adjust the install script in your application. 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. After your install script is updated accordingly, continue with the instructions below and skip step 4. If you opt for this method of implementing domain cookies, note that what's defined in the install script takes precedence over what's defined in your app settings.

  1. Open Pendo, and navigate to Settings > Subscription Settings. You must be an Admin to access this page.
  2. Open the Applications tab, then find and open the relevant app from your Applications list.

  3. Within the App Details tab, find the Cookies and data privacy section.
  4. 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 for cross-domain cookies), and enter the domain you'd like to enable agent cookies in.

    AppSettings_CookieDomain.png

  5. Ensure that the following options aren't selected. If either of these settings are selected, cookies won't work as expected:
    • Disable client-side storage
    • Don't use cookies when local storage is unavailable
  6. 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. This setting isn't currently available for extension apps.

    AppSettings_CrossAppCookies.png

  7. Repeat steps 2 to 6 for each app where you want to track anonymous visitors across subdomains.

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

Was this article helpful?
3 out of 5 found this helpful