cookieDomain & Tracking Anonymous Visitors Across Subdomains

Hi Community, I have a quick question about cookieDomain & Tracking Anonymous Visitors Across Subdomains

According to the support article all we need to do is simply add a cookieDomain flag within the pendo.initialize() function in the snippet. 

cookieDomain: .example.com

But adding cookieDomain as it showed in the article triggers an initialization error, so I assume that the value for this key/value pair should be enclosed with parentheses e.g. 

cookieDomain: '.example.com'

So the pendo.initialize section should look like this:

pendo.initialize({
            visitor: {
                id:              'VISITOR-UNIQUE-ID'   // Required if user is logged in
                // email:        // Recommended if using Pendo Feedback, or NPS Email
                // full_name:    // Recommended if using Pendo Feedback
                // role:         // Optional

                // You can add any additional visitor level key-values here,
                // as long as it's not one of the above reserved names.
            },

            account: {
              id:           'ACCOUNT-UNIQUE-ID' // Required if using Pendo Feedback
                // name:         // Optional
                // is_paying:    // Recommended if using Pendo Feedback
                // monthly_value:// Recommended if using Pendo Feedback
                // planLevel:    // Optional
                // planPrice:    // Optional
                // creationDate: // Optional

                // You can add any additional account level key-values here,
                // as long as it's not one of the above reserved names.
            },
            cookieDomain: '.example.com'
        });

Can anyone review and confirm this?

0

Comments

3 comments
  • Igor Gonebnyy That is correct - the value for the cookie domain needs to be wrapped in single quotes as you have in your example. I can submit a request to update the support doc to make sure that gets included. 

    1
  • Todd Stoffer Thank you for the confirmation, let's update the support doc! 

    0
  • Is it possible to pass an array of subdomains besides just one either by comma delimited list or as string array? I cannot find any documentation on this.

    0

Please sign in to leave a comment.

Didn't find what you were looking for?

New post