Skip to content

Commit

Permalink
Merge pull request #1538 from sharetribe/ga4-improvements
Browse files Browse the repository at this point in the history
Add cookie_flags and relax google analytics domain
  • Loading branch information
Gnito authored Jul 19, 2022
2 parents 818a636 + 45adf2d commit 1f8faa8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion server/csp.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const defaultDirectives = {

// Google Analytics
'www.googletagmanager.com',
'www.google-analytics.com',
'*.google-analytics.com',
'stats.g.doubleclick.net',

'sentry.io',
Expand Down
4 changes: 3 additions & 1 deletion server/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
});
</script>
`;
const googleAnalyticsScript = hasGoogleAnalyticsv4Id ? gtagScripts : '';
Expand Down

0 comments on commit 1f8faa8

Please sign in to comment.