Skip to content

Commit a2198d2

Browse files
committed
fix(doc): remove analytics plugin and use script
1 parent 28fc3fb commit a2198d2

File tree

4 files changed

+8
-15
lines changed

4 files changed

+8
-15
lines changed

doc/gatsby-config.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,5 @@ module.exports = {
2626
},
2727
},
2828
'gatsby-plugin-offline',
29-
{
30-
resolve: 'gatsby-plugin-google-analytics',
31-
options: {
32-
trackingId: 'UA-41862404-1',
33-
},
34-
},
3529
],
3630
};

doc/package-lock.json

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

doc/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"author": "Kyle Mathews <mathews.kyle@gmail.com>",
66
"dependencies": {
77
"gatsby": "^2.0.19",
8-
"gatsby-plugin-google-analytics": "^2.0.8",
98
"gatsby-plugin-manifest": "^2.0.5",
109
"gatsby-plugin-offline": "^2.0.5",
1110
"gatsby-plugin-react-helmet": "^3.0.0",

doc/src/components/layout.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@ const Layout = ({ children }) => (
3232
]}
3333
>
3434
<html lang="en" />
35+
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-41862404-5" />
36+
<script>
37+
{`window.dataLayer = window.dataLayer || [];
38+
function gtag(){ dataLayer.push(arguments); }
39+
gtag('js', new Date());
40+
41+
gtag('config', 'UA-41862404-1');`}
42+
</script>
3543
</Helmet>
3644
<Location>
3745
{({ location }) => <Header location={location} />}

0 commit comments

Comments
 (0)