mirror of
https://github.com/topjohnwu/cxx.git
synced 2024-11-23 11:59:46 +00:00
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:
parent
fc603fdc30
commit
8d5ca5450b
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user