Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,34 @@ module.exports = {
trackingId: process.env.GA_TRACKING_ID,
},
},
{
resolve: "gatsby-plugin-google-tagmanager",
options: {
id: process.env.GOOGLE_TAGMANAGER_ID,

// Include GTM in development.
//
// Defaults to false meaning GTM will only be loaded in production.
includeInDevelopment: false,

// datalayer to be set before GTM is loaded
// should be an object or a function that is executed in the browser
//
// Defaults to null
//defaultDataLayer: { platform: "gatsby" },

// Specify optional GTM environment details.
//gtmAuth: "YOUR_GOOGLE_TAGMANAGER_ENVIRONMENT_AUTH_STRING",
//gtmPreview: "YOUR_GOOGLE_TAGMANAGER_ENVIRONMENT_PREVIEW_NAME",
//dataLayerName: "YOUR_DATA_LAYER_NAME",

// Name of the event that is triggered
// on every Gatsby route change.
//
// Defaults to gatsby-route-change
//routeChangeEventName: "YOUR_ROUTE_CHANGE_EVENT_NAME",
},
},
{
resolve: `gatsby-plugin-hotjar`,
options: {
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"dotenv": "^8.2.0",
"gatsby": "^2.19.7",
"gatsby-plugin-google-analytics": "^2.3.13",
"gatsby-plugin-google-tagmanager": "^2.9.0",
"gatsby-plugin-hotjar": "^1.1.1",
"gatsby-plugin-sass": "^2.3.4",
"gatsby-theme-apollo": "^3.0.2",
Expand Down