Skip to content

Commit 111ae94

Browse files
gganchganchimeg
andauthored
remove GA and GTM and add gatsby plugin for google tag manager (#362)
Co-authored-by: ganchimeg <[email protected]>
1 parent dc93d6b commit 111ae94

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

gatsby-config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,5 +156,13 @@ module.exports = {
156156
// Consider enabling for PWA + offline functionality
157157
// https://gatsby.dev/offline
158158
// 'gatsby-plugin-offline',
159+
{
160+
resolve: "gatsby-plugin-google-tagmanager",
161+
options: {
162+
id: "GTM-PKQFGQB",
163+
dataLayerName: "cfDataLayer",
164+
selfHostedOrigin: "https://tr.www.cloudflare.com"
165+
},
166+
},
159167
],
160168
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"focus-visible-polyfill": "1.0.0",
1818
"gatsby": "2.24.7",
1919
"gatsby-image": "2.4.13",
20+
"gatsby-plugin-google-tagmanager": "^2.3.10",
2021
"gatsby-plugin-layout": "1.3.10",
2122
"gatsby-plugin-manifest": "2.4.18",
2223
"gatsby-plugin-material-ui": "2.1.9",

src/html.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ export default function HTML(props) {
99
<meta httpEquiv="x-ua-compatible" content="ie=edge"/>
1010
<meta name="viewport" content="width=device-width, initial-scale=1"/>
1111
{ props.headComponents }
12-
<script type="text/javascript" src="https://developers.cloudflare.com/_cf/analytics.js" />
13-
<script src="https://tr.www.cloudflare.com/gtm.js?id=GTM-PKQFGQB" />
1412
</head>
1513

1614
<body { ...props.bodyAttributes }>

0 commit comments

Comments
 (0)