Highlighted

persist data value across subdomains?

Rookie Contributor
When we setup a persist data value extension to add a value to a session cookie, will this persist across subdomains?
9 REPLIES 9
Highlighted

persist data value across subdomains?

Employee Emeritus
Hi Martijn, Yes - this should persist across any sub-domains on the same domain. Do you have any example URLs you want to test sharing across? I can take a look for you and confirm... Thanks, Roshan
Highlighted

persist data value across subdomains?

Employee Emeritus

Hi Martijn, I've had a look on your seat.nl and mii.seat.nl and our cookies are persisting across the sub-domain as the cookies are being set on '.seat.nl'. This means any page on 'seat.nl' or a sub domain (e.g. bigcars.seat.nl) will be able to persist values. However, I've looked at the logic of a persist values extension and I believe I know why you might have an issue:

 

persist-data-across-domains.png

 

Basically, the persist value extension will persist a variable whether it is populated or not unless you have a condition on it (see note). This might be the cause of issues you might be seeing. Any Qs, let me know! Thanks, Roshan

Highlighted

persist data value across subdomains?

Rookie Contributor
Hi Roshan, Thanks! We will definitely have to change the gclid condition. Just to make sure I understand. The session_variable extension doesn't need this same change, does it?
Highlighted

persist data value across subdomains?

Employee Emeritus
Hi Martijn, Yes, I believe so. I think it will need to check whether 'session_id' is populated. Although the extension keeps the first value set, if a user doesn't have the variable persisted in a cookie already, if the user's first hit is on a page where 'session_id' isn't populated (e.g. http://mii.seat.nl/) then it will persist 'undefined' until the user deletes that cookie. e.g. - user's first hit is http://mii.seat.nl/ - session_id is undefined so it is persisted in 'pon_session_id' cookie - user then hits http://www.seat.nl - session_id is defined but as the 'pon_session_id' is set to keep its first value 'pon_session_id' will continue with a value of 'undefined' If you add the condition, the 'pon_session_id' cookie will only be populated if a 'session_id' is present to it will always have a valid value. Hope this makes sense! Hope this helps!
Highlighted

persist data value across subdomains?

Rookie Contributor
Hi Roshan, I just had some time to check the way this works when all extensions are setup properly (I think they are). I have tested at Audi.nl First I go to the homepage www.audi.nl Then I click on the link in the footer to "directe selectie" (http://directeselectie.audi.nl) Both the session_id cookie value and the visitor_id cookie value change when I do this. However, this is not related to subdomains. It seems the cookie expires when I go to any page, even inside the same subdomain. Can you have another look at this please?
Highlighted

persist data value across subdomains?

Employee Emeritus
Hi Martijn, Thanks for your note. Let me take a look at this now...
Highlighted

persist data value across subdomains?

Employee Emeritus
Hi Martijn, I've had a look at this and I can't replicate the issue you are seeing - if I clear my cookies and then navigate across both sites I see the same values for both cookies: http://screencast.com/t/3WUxijrt4VVi Are you able to replicate this and show me how to do this? Thanks, Roshan
Highlighted

persist data value across subdomains?

Rookie Contributor
Hi Roshan, I was finally able to find the time to replicate this. Seems to work fine. Thanks for looking into this for me!
Highlighted

persist data value across subdomains?

Employee Emeritus
Great - glad it works!