Skip to content

Commit

Permalink
docs: refactor gtag
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasten committed Nov 25, 2024
1 parent d41752f commit bd76f97
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
11 changes: 5 additions & 6 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@ async function createConfig() {

// scripts
scripts: [
{ id: "Cookiebot", src: "https://consent.cookiebot.com/uc.js", "data-cbid": "a0cc864f-0b67-49be-8d65-9ed354de2ee6", "data-blockingmode": "auto" },
{ id: "CookieDeclaration", src: "https://consent.cookiebot.com/a0cc864f-0b67-49be-8d65-9ed354de2ee6/cd.js" }
{
src: '/contrast/gtagman.js',
async: true,
"data-cookieconsent": "ignore",
},
],

// Even if you don't use internalization, you can use this field to set useful
Expand Down Expand Up @@ -56,10 +59,6 @@ async function createConfig() {
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
gtag: {
trackingID: 'G-3DVYB2CHLG',
anonymizeIP: true,
}
}),
],
],
Expand Down
1 change: 0 additions & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"dependencies": {
"@cmfcmf/docusaurus-search-local": "1.2.0",
"@docusaurus/core": "3.6.1",
"@docusaurus/plugin-google-gtag": "3.6.1",
"@docusaurus/preset-classic": "3.6.1",
"@docusaurus/theme-mermaid": "3.6.1",
"@mdx-js/react": "3.0.1",
Expand Down
5 changes: 5 additions & 0 deletions docs/static/gtagman.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-NF9NM7V');

0 comments on commit bd76f97

Please sign in to comment.