From c188cdb8734867c962fd6bf7665a4b9a45bc277d Mon Sep 17 00:00:00 2001 From: ReddyyZ Date: Wed, 27 Dec 2023 16:28:14 -0300 Subject: [PATCH] Add analytics --- gatsby-config.js | 11 ++++++++++- package-lock.json | 27 +++++++++++++++++++++++++++ package.json | 1 + 3 files changed, 38 insertions(+), 1 deletion(-) diff --git a/gatsby-config.js b/gatsby-config.js index ab0e3ae..37d907c 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -24,5 +24,14 @@ module.exports = { display: `standalone`, icon: 'src/assets/favicon.png' }, - }] + },{ + resolve: `gatsby-plugin-google-gtag`, + options: { + // You can add multiple tracking ids and a pageview event will be fired for all of them. + trackingIds: [ + "G-J5Z68L7N4P", // Google Analytics / GA + ], + }, + } +] }; \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index eead143..b83cd30 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "dependencies": { "autoprefixer": "^10.4.16", "gatsby": "^5.12.4", + "gatsby-plugin-google-gtag": "^5.13.0", "gatsby-plugin-image": "^3.12.3", "gatsby-plugin-manifest": "^5.13.0", "gatsby-plugin-postcss": "^6.12.0", @@ -8838,6 +8839,23 @@ "@parcel/core": "^2.0.0" } }, + "node_modules/gatsby-plugin-google-gtag": { + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/gatsby-plugin-google-gtag/-/gatsby-plugin-google-gtag-5.13.0.tgz", + "integrity": "sha512-UPC/wET8T6ZdNjpQrz43EnRUQ2WjTX5E7HT3kfwshcYSjtGyBo4RxDdY6lnnmG8gQxmsUL86cvzqQt0ojs2xAQ==", + "dependencies": { + "@babel/runtime": "^7.20.13", + "minimatch": "^3.1.2" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "gatsby": "^5.0.0-next", + "react": "^18.0.0 || ^0.0.0", + "react-dom": "^18.0.0 || ^0.0.0" + } + }, "node_modules/gatsby-plugin-image": { "version": "3.12.3", "resolved": "https://registry.npmjs.org/gatsby-plugin-image/-/gatsby-plugin-image-3.12.3.tgz", @@ -23313,6 +23331,15 @@ "@parcel/transformer-json": "2.8.3" } }, + "gatsby-plugin-google-gtag": { + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/gatsby-plugin-google-gtag/-/gatsby-plugin-google-gtag-5.13.0.tgz", + "integrity": "sha512-UPC/wET8T6ZdNjpQrz43EnRUQ2WjTX5E7HT3kfwshcYSjtGyBo4RxDdY6lnnmG8gQxmsUL86cvzqQt0ojs2xAQ==", + "requires": { + "@babel/runtime": "^7.20.13", + "minimatch": "^3.1.2" + } + }, "gatsby-plugin-image": { "version": "3.12.3", "resolved": "https://registry.npmjs.org/gatsby-plugin-image/-/gatsby-plugin-image-3.12.3.tgz", diff --git a/package.json b/package.json index c8d3439..ef016c2 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "dependencies": { "autoprefixer": "^10.4.16", "gatsby": "^5.12.4", + "gatsby-plugin-google-gtag": "^5.13.0", "gatsby-plugin-image": "^3.12.3", "gatsby-plugin-manifest": "^5.13.0", "gatsby-plugin-postcss": "^6.12.0",