Adding Google Analytics integration

This commit is contained in:
Jeff Avallone 2019-01-03 18:29:42 -05:00
parent a5babf8965
commit c26bf26bd1
3 changed files with 17 additions and 1 deletions

View File

@ -11,6 +11,14 @@ module.exports = {
}, },
plugins: [ plugins: [
'gatsby-plugin-react-helmet', 'gatsby-plugin-react-helmet',
'gatsby-plugin-postcss' 'gatsby-plugin-postcss',
{
resolve: 'gatsby-plugin-google-analytics',
options: {
trackingId: process.env.GA_PROPERTY,
anonymize: true,
respectDNT: true
}
}
] ]
}; };

View File

@ -32,6 +32,7 @@
"eslint": "^5.11.1", "eslint": "^5.11.1",
"eslint-plugin-react": "^7.12.1", "eslint-plugin-react": "^7.12.1",
"gatsby": "^2.0.81", "gatsby": "^2.0.81",
"gatsby-plugin-google-analytics": "^2.0.8",
"gatsby-plugin-postcss": "^2.0.2", "gatsby-plugin-postcss": "^2.0.2",
"gatsby-plugin-react-helmet": "^3.0.5", "gatsby-plugin-react-helmet": "^3.0.5",
"postcss-cssnext": "^3.1.0", "postcss-cssnext": "^3.1.0",

View File

@ -4681,6 +4681,13 @@ gatsby-link@^2.0.7:
"@types/reach__router" "^1.0.0" "@types/reach__router" "^1.0.0"
prop-types "^15.6.1" prop-types "^15.6.1"
gatsby-plugin-google-analytics@^2.0.8:
version "2.0.8"
resolved "https://registry.yarnpkg.com/gatsby-plugin-google-analytics/-/gatsby-plugin-google-analytics-2.0.8.tgz#bef7913726e70f03533c4d14bfc73f8bd73550e0"
integrity sha512-1NYqBWTpwCYhJ03x2UJ9/hgzP75Fij6dNMb/Ib+S2md5sVX0FncJrq6vwQoXXNRymH7vqbQoB9hPdaX62UHyfw==
dependencies:
"@babel/runtime" "^7.0.0"
gatsby-plugin-page-creator@^2.0.5: gatsby-plugin-page-creator@^2.0.5:
version "2.0.5" version "2.0.5"
resolved "https://registry.yarnpkg.com/gatsby-plugin-page-creator/-/gatsby-plugin-page-creator-2.0.5.tgz#16b268142aa3515b5856bf802d8eec5a6320dc1c" resolved "https://registry.yarnpkg.com/gatsby-plugin-page-creator/-/gatsby-plugin-page-creator-2.0.5.tgz#16b268142aa3515b5856bf802d8eec5a6320dc1c"