Skip to content

Commit

Permalink
Merge pull request #90 from CenWIDev/google-analytics
Browse files Browse the repository at this point in the history
#66 Add Google Analytics
  • Loading branch information
jevenson authored Sep 17, 2020
2 parents c4bbdaa + 97abf61 commit 07a35ac
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 19 deletions.
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

0 comments on commit 07a35ac

Please sign in to comment.