diff --git a/gatsby-config.ts b/gatsby-config.ts index ae63963..cdccca0 100644 --- a/gatsby-config.ts +++ b/gatsby-config.ts @@ -123,5 +123,25 @@ module.exports = { }, }, }, + { + resolve: 'gatsby-plugin-google-tagmanager', + options: { + id: 'GTM-THWTQDT', + + // 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' }, + + // Name of the event that is triggered + // on every Gatsby route change. + // Defaults to false + enableWebVitalsTracking: true, + }, + }, ], }; diff --git a/package-lock.json b/package-lock.json index 210d372..a9cc919 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "license": "0BSD", "dependencies": { "gatsby": "5.13.3", + "gatsby-plugin-google-tagmanager": "^5.13.1", "gatsby-plugin-image": "3.13.1", "gatsby-plugin-react-helmet": "6.13.1", "gatsby-plugin-sass": "6.13.1", @@ -10867,6 +10868,23 @@ "gatsby": "^2 || ^3 || ^4 || ^5" } }, + "node_modules/gatsby-plugin-google-tagmanager": { + "version": "5.13.1", + "resolved": "https://registry.npmjs.org/gatsby-plugin-google-tagmanager/-/gatsby-plugin-google-tagmanager-5.13.1.tgz", + "integrity": "sha512-n6I164KvPtl+Nx9bBpXXkb6aw1oA1GuAccswjQ5lpQqB2JG5MtcQU6hwdQlwkIVv9+VCRQSZf3mOn6zU7BDO+A==", + "dependencies": { + "@babel/runtime": "^7.20.13", + "web-vitals": "^1.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.13.1", "resolved": "https://registry.npmjs.org/gatsby-plugin-image/-/gatsby-plugin-image-3.13.1.tgz", @@ -20627,6 +20645,11 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/web-vitals": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/web-vitals/-/web-vitals-1.1.2.tgz", + "integrity": "sha512-PFMKIY+bRSXlMxVAQ+m2aw9c/ioUYfDgrYot0YUa+/xa0sakubWhSDyxAKwzymvXVdF4CZI71g06W+mqhzu6ig==" + }, "node_modules/webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", diff --git a/package.json b/package.json index a6e6d38..c037c81 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ }, "dependencies": { "gatsby": "5.13.3", + "gatsby-plugin-google-tagmanager": "^5.13.1", "gatsby-plugin-image": "3.13.1", "gatsby-plugin-react-helmet": "6.13.1", "gatsby-plugin-sass": "6.13.1", diff --git a/src/components/Layout/Footer.tsx b/src/components/Layout/Footer.tsx index 8a1c347..c5f7322 100644 --- a/src/components/Layout/Footer.tsx +++ b/src/components/Layout/Footer.tsx @@ -29,7 +29,7 @@ export const Footer = () => { Regulamin {' '} |{' '} - + Polityka prywatności
diff --git a/src/components/Layout/Layout.tsx b/src/components/Layout/Layout.tsx index 55288a6..e9a740a 100644 --- a/src/components/Layout/Layout.tsx +++ b/src/components/Layout/Layout.tsx @@ -53,7 +53,7 @@ export const Layout = ({ children, heroTextContent, heroBackgroundImage, heroCla >