From 8d5ca5450bdd72d15e99c52154190e0d1809ae56 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Mon, 19 Jun 2023 18:41:49 -0700 Subject: [PATCH] Set SameSite attribute for gtag MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- book/theme/head.hbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/theme/head.hbs b/book/theme/head.hbs index 934ae8f4b..d6b32cb98 100644 --- a/book/theme/head.hbs +++ b/book/theme/head.hbs @@ -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'});