Skip to content

Commit

Permalink
Google Analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
billycougz committed Apr 28, 2023
1 parent e7a36a3 commit 257eb64
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ node_modules/
.cache/
public
.DS_STORE
notes.txt
notes.txt
.env*
10 changes: 10 additions & 0 deletions gatsby-config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
require('dotenv').config({
path: `.env.${process.env.NODE_ENV}`,
});

/**
* @type {import('gatsby').GatsbyConfig}
*/
Expand Down Expand Up @@ -29,5 +33,11 @@ module.exports = {
icon: 'src/assets/icon.png',
},
},
{
resolve: 'gatsby-plugin-google-gtag',
options: {
trackingIds: [process.env.GA_MEASUREMENT_ID],
},
},
],
};
55 changes: 48 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@
"deploy": "gatsby build && gh-pages -d public -b gh-pages"
},
"dependencies": {
"dotenv": "^16.0.3",
"gatsby": "^5.9.0",
"gatsby-omni-font-loader": "^2.0.2",
"gatsby-plugin-google-gtag": "^5.9.0",
"gatsby-plugin-manifest": "^5.9.0",
"gatsby-plugin-styled-components": "^6.9.0",
"react": "^18.2.0",
Expand Down

0 comments on commit 257eb64

Please sign in to comment.