Skip to content

Commit

Permalink
Follow advice in gatsbyjs/gatsby#12967 - move first, add 'head' and '…
Browse files Browse the repository at this point in the history
…anonymise' options
  • Loading branch information
holly-cummins committed Feb 3, 2021
1 parent c9b7f08 commit 00fc8ec
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ module.exports = {
}
},
plugins: [
{
resolve: `gatsby-plugin-google-analytics`,
options: {
trackingId: process.env.GOOGLE_ANALYTICS_ID,
head: true,
anonymize: true
}
},
`gatsby-plugin-styled-jsx`, // the plugin's code is inserted directly to gatsby-node.js and gatsby-ssr.js files
`gatsby-plugin-styled-jsx-postcss`, // as above
{
Expand Down Expand Up @@ -198,12 +206,6 @@ module.exports = {
}
},
`gatsby-plugin-offline`,
{
resolve: `gatsby-plugin-google-analytics`,
options: {
trackingId: process.env.GOOGLE_ANALYTICS_ID
}
},
{
resolve: `gatsby-plugin-feed`,
options: {
Expand Down

0 comments on commit 00fc8ec

Please sign in to comment.