google-marketing-solutions / gps-sgtm-pantheon

Apache License 2.0
68 stars 10 forks source link

Deipneus - Set Cookie #14

Open AGyrup opened 1 week ago

AGyrup commented 1 week ago

We couldn't read the cookie set by Deipneus in client-side GTM. We discovered it helps update lines 113-119 in file set_cookie_in_browser.tpl, as client-side GTM can't read 'httpOnly': true cookies. Besides that, we see that the cookie was saved in a folder for which we added a path.

Current template:

setCookie(
      makeString(name), 
      makeString(cookies[cookie].value),
      {'domain': 'auto',
       'max-age': expiryInSecond, 
       'httpOnly': true}
    );

Updated template:

setCookie(
      makeString(name), 
      makeString(cookies[cookie].value),
      {'domain': 'auto',
       'path': '/',
       'max-age': expiryInSecond}
    );
tdsymonds commented 1 week ago

Thanks for providing the feedback.

We will update the template to address these challenges as soon as possible.