Skip to content

Commit

Permalink
feat: Ajouté GTM pour que GA4 puisse fonctionner (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
JeanRemyDuboc authored Oct 4, 2022
1 parent 5c5e39b commit 8256554
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion data/site-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const config = {
siteUrl: process.env.ROOT_URL || "https://erreur200.com", // Domain of your website without pathPrefix.
pathPrefix: "/", // Prefixes all links. For cases when deployed to example.github.io/gatsby-advanced-starter/.
siteDescription: "Erreur 200 est un podcast dédié aux gens qui font le web. Animé par deux développeurs français, l'un vivant au Canada, l'autre en Angleterre, nous échangeons sur le web d'aujourd'hui et de demain. ", // Website description used for RSS feeds/meta description tag.
googleAnalyticsID: "G-1K83YYJLKD",
GTMTrackingID: "GTM-P63722Z",
dateFromFormat: "YYYY-MM-DD", // Date format used in the frontmatter.
dateFormat: "DD/MM/YYYY", // Date format for display.
userName: "Erreur 200", // Username to display in the author segment.
Expand Down
5 changes: 3 additions & 2 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ module.exports = {
{
resolve: `gatsby-plugin-gdpr-cookies`,
options: {
googleAnalytics: {
trackingId: config.googleAnalyticsID,
googleTagManager: {
trackingId: config.GTMTrackingID,
dataLayerName: 'dataLayer', // default
},
defaultLang: 'fr'
},
Expand Down
4 changes: 2 additions & 2 deletions src/hooks/useSiteMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ interface IUseSiteMetadata {
siteUrl: string
pathPrefix: string
siteDescription: string
googleAnalyticsID: string
GTMTrackingID: string
dateFromFormat: string
dateFormat: string
userName: string
Expand Down Expand Up @@ -40,7 +40,7 @@ export const useSiteMetadata = (): IUseSiteMetadata => {
siteUrl
pathPrefix
siteDescription
googleAnalyticsID
GTMTrackingID
dateFromFormat
dateFormat
userName
Expand Down

0 comments on commit 8256554

Please sign in to comment.