Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#66 Add Google Analytics #90

Merged
merged 1 commit into from
Sep 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,21 @@ module.exports = {
}
}
},
{
resolve: `gatsby-plugin-google-analytics`,
options: {
// The property ID; the tracking code won't be generated without it
trackingId: "UA-39484225-8",
// Defines where to place the tracking script - `true` in the head and `false` in the body
head: false,
// Setting this parameter is optional
anonymize: true,
// Setting this parameter is also optional
respectDNT: true,
// Delays sending pageview hits on route update (in milliseconds)
pageTransitionDelay: 0
},
},
// 'gatsby-plugin-offline',
'gatsby-plugin-remove-serviceworker',
'gatsby-plugin-typescript',
Expand All @@ -67,4 +82,4 @@ module.exports = {
},
'gatsby-plugin-netlify' // This must be last in the config list
]
}
}
60 changes: 42 additions & 18 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"formik": "^1.5.8",
"gatsby": "^2.19.17",
"gatsby-plugin-create-client-paths": "^2.1.22",
"gatsby-plugin-google-analytics": "^2.3.14",
"gatsby-plugin-manifest": "^2.2.41",
"gatsby-plugin-netlify": "^2.1.32",
"gatsby-plugin-offline": "^2.2.10",
Expand Down