Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: refactor gtag #1025

Merged
merged 1 commit into from
Nov 25, 2024
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
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');