Set SameSite attribute for gtag

Cookie “_ga” does not have a proper “SameSite” attribute value.
    Soon, cookies without the “SameSite” attribute or with an invalid
    value will be treated as “Lax”. This means that the cookie will no
    longer be sent in third-party contexts. If your application depends
    on this cookie being available in such contexts, please add the
    “SameSite=None“ attribute to it. To know more about the “SameSite“
    attribute, read https://developer.mozilla.org/docs/Web/HTTP/Headers/Set-Cookie/SameSite
This commit is contained in:
David Tolnay 2023-06-19 18:41:49 -07:00
parent fc603fdc30
commit 8d5ca5450b
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -3,5 +3,5 @@
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-DG41MK6DDN', {'anonymize_ip': true});
gtag('config', 'G-DG41MK6DDN', {anonymize_ip: true, cookie_domain: 'cxx.rs', cookie_flags: 'samesite=strict;secure'});
</script>