From 921dea020daafe546b08427e7c58e3e71b62cc45 Mon Sep 17 00:00:00 2001 From: Vesa Luusua Date: Tue, 19 Jul 2022 15:04:40 +0300 Subject: [PATCH 1/2] Add cookie_flags and relax google analytics domain --- server/csp.js | 2 +- server/renderer.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/server/csp.js b/server/csp.js index 1edf640777..334a912803 100644 --- a/server/csp.js +++ b/server/csp.js @@ -33,7 +33,7 @@ const defaultDirectives = { // Google Analytics 'www.googletagmanager.com', - 'www.google-analytics.com', + '*.google-analytics.com', 'stats.g.doubleclick.net', 'sentry.io', diff --git a/server/renderer.js b/server/renderer.js index 88681925e0..79f02ba76d 100644 --- a/server/renderer.js +++ b/server/renderer.js @@ -142,7 +142,9 @@ exports.render = function(requestUrl, context, data, renderApp, webExtractor) { function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); - gtag('config', '${googleAnalyticsId}'); + gtag('config', '${googleAnalyticsId}', { + cookie_flags: 'SameSite=None;Secure', + }); `; const googleAnalyticsScript = hasGoogleAnalyticsv4Id ? gtagScripts : ''; From 45adf2d0659ac433a11b4a94aac236c233313181 Mon Sep 17 00:00:00 2001 From: Vesa Luusua Date: Tue, 19 Jul 2022 16:02:30 +0300 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1549c4e3e0..b2850cda8a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,8 @@ way to update this template, but currently, we follow a pattern: ## Upcoming version 2022-XX-XX +- [fix] Add cookie_flags and relax google analytics domain + [#1538](https://github.com/sharetribe/ftw-daily/pull/1538) - [fix] the import of customMediaQueries.css was somehow missed with these components: FieldReviewRating, SearchFiltersSecondary and TopbarMobileMenu. [#1537](https://github.com/sharetribe/ftw-daily/pull/1537)