From ba93dc6578a3d9944b83ec0a10ead8f8cf15b61a Mon Sep 17 00:00:00 2001 From: Victor Zhou Date: Thu, 21 Mar 2019 16:53:15 -0400 Subject: [PATCH] Replace gatsby-plugin-gtagjs with gatsby-plugin-google-gtag --- gatsby-config.js | 8 +++++--- package-lock.json | 12 ++++++++---- package.json | 2 +- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/gatsby-config.js b/gatsby-config.js index 1a9c764..790cac8 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -123,10 +123,12 @@ module.exports = { } }, { - resolve: 'gatsby-plugin-gtagjs', + resolve: 'gatsby-plugin-google-gtag', options: { - trackingId: siteConfig.googleAnalyticsId, - head: true, + trackingIds: [siteConfig.googleAnalyticsId], + pluginConfig: { + head: true, + }, }, }, { diff --git a/package-lock.json b/package-lock.json index 841d5a4..b4abb6d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8615,10 +8615,14 @@ "rss": "^1.2.2" } }, - "gatsby-plugin-gtagjs": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/gatsby-plugin-gtagjs/-/gatsby-plugin-gtagjs-1.0.0.tgz", - "integrity": "sha512-QogQjtTCV+P6tQX1S8/NPfaZ/IE9mzrFiVYXMaPmAzXfNjQVnr9TAgQjebCBfVoBavWn+OMy5Zma5xlh2iTxIw==" + "gatsby-plugin-google-gtag": { + "version": "1.0.16", + "resolved": "https://registry.npmjs.org/gatsby-plugin-google-gtag/-/gatsby-plugin-google-gtag-1.0.16.tgz", + "integrity": "sha512-gkMWtLVLhakElmzKqM3gBQXdYCzaiF4jHXojxQSsmeuVvASaU1SIU8bl1iUbY6K6Atpw3ZN7TYFV0BJvUYFmKg==", + "requires": { + "@babel/runtime": "^7.0.0", + "minimatch": "^3.0.4" + } }, "gatsby-plugin-manifest": { "version": "2.0.24", diff --git a/package.json b/package.json index 15f8e86..b65b13f 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "gatsby-link": "^2.0.10", "gatsby-plugin-catch-links": "^2.0.10", "gatsby-plugin-feed": "^2.0.13", - "gatsby-plugin-gtagjs": "^1.0.0", + "gatsby-plugin-google-gtag": "^1.0.16", "gatsby-plugin-manifest": "^2.0.17", "gatsby-plugin-netlify": "^2.0.9", "gatsby-plugin-netlify-cms": "^3.0.12",