Skip to content

Commit b60a942

Browse files
committed
Add google tag manager
1 parent d19b451 commit b60a942

File tree

3 files changed

+39
-33
lines changed

3 files changed

+39
-33
lines changed

gatsby-config.js

+23-17
Original file line numberDiff line numberDiff line change
@@ -58,25 +58,31 @@ module.exports = {
5858
},
5959
},
6060
{
61-
resolve: `gatsby-plugin-google-analytics`,
61+
resolve: `gatsby-plugin-google-tagmanager`,
6262
options: {
63-
trackingId: "UA-101997744-9",
64-
// Puts tracking script in the head instead of the body
65-
head: true,
66-
// Setting this parameter is optional
67-
anonymize: true,
68-
// Setting this parameter is also optional
69-
respectDNT: true,
70-
// Avoids sending pageview hits from custom paths
71-
exclude: ["/preview/**", "/do-not-track/me/too/"],
72-
},
73-
},
74-
{
75-
resolve: `gatsby-plugin-google-adsense`,
76-
options: {
77-
publisherId: `ca-pub-7556700931518738`,
78-
},
63+
id: `GTM-T7JRL7P`,
64+
}
7965
},
66+
// {
67+
// resolve: `gatsby-plugin-google-analytics`,
68+
// options: {
69+
// trackingId: "UA-101997744-9",
70+
// // Puts tracking script in the head instead of the body
71+
// head: true,
72+
// // Setting this parameter is optional
73+
// anonymize: true,
74+
// // Setting this parameter is also optional
75+
// respectDNT: true,
76+
// // Avoids sending pageview hits from custom paths
77+
// exclude: ["/preview/**", "/do-not-track/me/too/"],
78+
// },
79+
// },
80+
// {
81+
// resolve: `gatsby-plugin-google-adsense`,
82+
// options: {
83+
// publisherId: `ca-pub-7556700931518738`,
84+
// },
85+
// },
8086
// this (optional) plugin enables Progressive Web App + Offline functionality
8187
// To learn more, visit: https://gatsby.dev/offline
8288
// `gatsby-plugin-offline`,

package-lock.json

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

package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
"dependencies": {
88
"gatsby": "^2.21.9",
99
"gatsby-image": "^2.4.0",
10-
"gatsby-plugin-google-adsense": "^1.1.3",
11-
"gatsby-plugin-google-analytics": "^2.3.0",
10+
"gatsby-plugin-google-tagmanager": "^2.3.11",
1211
"gatsby-plugin-manifest": "^2.4.1",
1312
"gatsby-plugin-offline": "^3.2.0",
1413
"gatsby-plugin-react-helmet": "^3.3.0",

0 commit comments

Comments
 (0)