Skip to content

Commit 2773e08

Browse files
authored
GA4 added for tutorials (#2)
1 parent b412a29 commit 2773e08

3 files changed

Lines changed: 77 additions & 48 deletions

File tree

gatsby-config.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,21 @@ module.exports = {
106106
host: "https://wchat.freshchat.com",
107107
},
108108
},
109+
{
110+
resolve: `gatsby-plugin-google-analytics`,
111+
options: {
112+
trackingId: "UA-99606664-1",
113+
head: false,
114+
anonymize: true,
115+
respectDNT: true,
116+
enableWebVitalsTracking: true,
117+
},
118+
},
109119
{
110120
resolve: `gatsby-plugin-google-gtag`,
111121
options: {
112122
trackingIds: [
113-
"UA-99606664-1", // Google Analytics
123+
"G-ZE2Z1J3VPK", // Google Analytics 4
114124
"AW-777462306", // Google Tag Manager
115125
],
116126
pluginConfig: {

package-lock.json

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

package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,13 @@
2121
"dotenv": "^10.0.0",
2222
"gatsby": "^3.13.0",
2323
"gatsby-plugin-algolia": "^0.22.2",
24+
"gatsby-plugin-freshchat": "^1.0.0-rc1",
25+
"gatsby-plugin-google-analytics": "^4.14.0",
26+
"gatsby-plugin-google-gtag": "^4.4.0",
2427
"gatsby-plugin-image": "^1.13.0",
28+
"gatsby-plugin-s3": "^0.3.8",
2529
"gatsby-plugin-sass": "^4.13.0",
2630
"gatsby-plugin-sharp": "^3.13.0",
27-
"gatsby-plugin-s3": "^0.3.8",
2831
"gatsby-remark-autolink-headers": "^2.1.11",
2932
"gatsby-remark-check-links": "^2.1.0",
3033
"gatsby-remark-custom-blocks": "^3.14.0",
@@ -38,15 +41,13 @@
3841
"prop-types": "^15.7.2",
3942
"react": "^17.0.1",
4043
"react-dom": "^17.0.1",
44+
"react-google-recaptcha": "^2.1.0",
4145
"react-helmet": "^6.1.0",
4246
"react-instantsearch-dom": "^6.12.1",
4347
"react-onclickout": "^2.0.8",
4448
"sass": "^1.41.0",
4549
"tailwindcss": "^2.2.15",
46-
"uuid": "^8.3.2",
47-
"react-google-recaptcha": "^2.1.0",
48-
"gatsby-plugin-google-gtag": "^4.4.0",
49-
"gatsby-plugin-freshchat": "^1.0.0-rc1"
50+
"uuid": "^8.3.2"
5051
},
5152
"devDependencies": {
5253
"gatsby-plugin-postcss": "^4.13.0"

0 commit comments

Comments
 (0)