From 420a7a2b684238c9ae87d3167aad5abbf50e2d6e Mon Sep 17 00:00:00 2001 From: Hippo Date: Sat, 28 Sep 2019 16:49:23 +0530 Subject: [PATCH] Add Google Analytics We have to do this for now :( hopefully find a self-hosted solution later --- gatsby-config.js | 10 ++++++++++ package.json | 1 + yarn.lock | 14 ++++++++++++++ 3 files changed, 25 insertions(+) diff --git a/gatsby-config.js b/gatsby-config.js index a345200..b996ad6 100755 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -62,6 +62,16 @@ module.exports = { ? ghostConfig.development : ghostConfig.production, }, + /** + * Analytics Plugins + */ + { + resolve: `gatsby-plugin-google-analytics`, + options: { + trackingId: "UA-148902590-1", + respectDNT: true, + }, + }, /** * Utility Plugins */ diff --git a/package.json b/package.json index 27f9d73..4c80648 100755 --- a/package.json +++ b/package.json @@ -46,6 +46,7 @@ "gatsby-plugin-catch-links": "2.1.9", "gatsby-plugin-feed": "2.3.12", "gatsby-plugin-force-trailing-slashes": "1.0.4", + "gatsby-plugin-google-analytics": "^2.1.19", "gatsby-plugin-manifest": "2.2.17", "gatsby-plugin-offline": "3.0.7", "gatsby-plugin-react-helmet": "3.1.7", diff --git a/yarn.lock b/yarn.lock index 9895b8f..34a6bc2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -738,6 +738,13 @@ dependencies: regenerator-runtime "^0.13.2" +"@babel/runtime@^7.6.2": + version "7.6.2" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.6.2.tgz#c3d6e41b304ef10dcf13777a33e7694ec4a9a6dd" + integrity sha512-EXxN64agfUqqIGeEjI5dL5z0Sw0ZwWo1mLTi4mQowCZ42O59b7DRpZAnTC6OqdF28wMBMFKNb/4uFGrVaigSpg== + dependencies: + regenerator-runtime "^0.13.2" + "@babel/template@^7.1.0", "@babel/template@^7.4.4", "@babel/template@^7.6.0": version "7.6.0" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.6.0.tgz#7f0159c7f5012230dad64cca42ec9bdb5c9536e6" @@ -5410,6 +5417,13 @@ gatsby-plugin-force-trailing-slashes@1.0.4: dependencies: "@babel/runtime" "7.0.0-beta.51" +gatsby-plugin-google-analytics@^2.1.19: + version "2.1.19" + resolved "https://registry.yarnpkg.com/gatsby-plugin-google-analytics/-/gatsby-plugin-google-analytics-2.1.19.tgz#b13066bf1600a15c95d1f1ae66e67ad62aa2d13e" + integrity sha512-B5LHoxb2mo5wQXfsKj9yKNkbIr5mBp7pIcwQbFPjRVCXZ5DaORaTPS6fF1Gskhip9W/o7s4kZvkNbonCAFjNGQ== + dependencies: + "@babel/runtime" "^7.6.2" + gatsby-plugin-manifest@2.2.17: version "2.2.17" resolved "https://registry.yarnpkg.com/gatsby-plugin-manifest/-/gatsby-plugin-manifest-2.2.17.tgz#32434353b999fe054e682f68a0ce0c3d6dbe247f"