Skip to content
This repository was archived by the owner on May 13, 2025. It is now read-only.

Commit 1f8faa8

Browse files
authored
Merge pull request #1538 from sharetribe/ga4-improvements
Add cookie_flags and relax google analytics domain
2 parents 818a636 + 45adf2d commit 1f8faa8

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ way to update this template, but currently, we follow a pattern:
1414

1515
## Upcoming version 2022-XX-XX
1616

17+
- [fix] Add cookie_flags and relax google analytics domain
18+
[#1538](https://github.com/sharetribe/ftw-daily/pull/1538)
1719
- [fix] the import of customMediaQueries.css was somehow missed with these components:
1820
FieldReviewRating, SearchFiltersSecondary and TopbarMobileMenu.
1921
[#1537](https://github.com/sharetribe/ftw-daily/pull/1537)

server/csp.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const defaultDirectives = {
3333

3434
// Google Analytics
3535
'www.googletagmanager.com',
36-
'www.google-analytics.com',
36+
'*.google-analytics.com',
3737
'stats.g.doubleclick.net',
3838

3939
'sentry.io',

server/renderer.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,9 @@ exports.render = function(requestUrl, context, data, renderApp, webExtractor) {
142142
function gtag(){dataLayer.push(arguments);}
143143
gtag('js', new Date());
144144
145-
gtag('config', '${googleAnalyticsId}');
145+
gtag('config', '${googleAnalyticsId}', {
146+
cookie_flags: 'SameSite=None;Secure',
147+
});
146148
</script>
147149
`;
148150
const googleAnalyticsScript = hasGoogleAnalyticsv4Id ? gtagScripts : '';

0 commit comments

Comments
 (0)