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

Commit 3d633f8

Browse files
author
Joel Worrall
committed
fix: addressing GDPR loading issue
1 parent 366aefb commit 3d633f8

File tree

3 files changed

+21
-43
lines changed

3 files changed

+21
-43
lines changed

gatsby-config.js

+14-7
Original file line numberDiff line numberDiff line change
@@ -162,16 +162,23 @@ module.exports = {
162162
}
163163
},
164164
{
165-
resolve: `gatsby-plugin-gdpr-cookies`,
165+
resolve: 'gatsby-plugin-gdpr-tracking',
166166
options: {
167-
googleTagManager: {
168-
trackingId: 'UA-3047412-33', // leave empty if you want to disable the tracker
169-
cookieName: 'newrelic-gdpr-consent', // default
170-
dataLayerName: 'dataLayer', // default
167+
// logging to the console, if debug is true
168+
debug: false,
169+
googleAnalytics: {
170+
// The property ID; the tracking code won't be generated without it.
171+
trackingId: 'UA-3047412-33',
172+
// Defines it google analytics should be started with out the cookie consent
173+
autoStart: false, // <--- default
174+
// Setting this parameter is optional
175+
anonymize: true, // <--- default
176+
// Name of the cookie, that enables the tracking if it is true
177+
controlCookieName: 'newrelic-gdpr-consent', // <--- default
178+
cookieFlags: 'secure;samesite=none' // <--- default
171179
},
172-
// defines the environments where the tracking should be available - default is ["production"]
173180
environments: ['production', 'development']
174-
},
181+
}
175182
}
176183
]
177184
};

package-lock.json

+6-35
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"feather-icons": "^4.28.0",
1010
"gatsby": "^2.22.11",
1111
"gatsby-image": "^2.4.5",
12-
"gatsby-plugin-gdpr-cookies": "^1.0.7",
12+
"gatsby-plugin-gdpr-tracking": "^1.1.0",
1313
"gatsby-plugin-manifest": "^2.4.9",
1414
"gatsby-plugin-mdx": "^1.2.12",
1515
"gatsby-plugin-newrelic": "https://github.com/newrelic/gatsby-plugin-newrelic.git#5cd42e832f0588764dc332ce7ebd05794de5106a",

0 commit comments

Comments
 (0)