Skip to content

Commit ad88c6a

Browse files
author
pramod sareddy
committed
add GA4 property tag for GA4 analytics
1 parent d7e82ff commit ad88c6a

File tree

3 files changed

+45
-0
lines changed

3 files changed

+45
-0
lines changed

gatsby-config.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,18 @@ module.exports = {
244244
head: true,
245245
},
246246
},
247+
{
248+
resolve: 'gatsby-plugin-google-gtag',
249+
options: {
250+
trackingIds: [
251+
'357693145', // Google Analytics / GA
252+
],
253+
pluginConfig: {
254+
// Puts tracking script in the head instead of the body
255+
head: true,
256+
},
257+
},
258+
},
247259
{
248260
resolve: 'gatsby-plugin-adobe-launch-hpe',
249261
options: {

package-lock.json

Lines changed: 32 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"gatsby-plugin-catch-links": "^2.10.0",
2323
"gatsby-plugin-feed": "^2.13.0",
2424
"gatsby-plugin-google-analytics": "^2.11.0",
25+
"gatsby-plugin-google-gtag": "^5.7.0",
2526
"gatsby-plugin-lunr": "^1.5.2",
2627
"gatsby-plugin-manifest": "2.4.34",
2728
"gatsby-plugin-netlify-cms": "^4.10.0",

0 commit comments

Comments
 (0)