Skip to content

Commit 41d53d9

Browse files
committed
Add gtag scripts for G-SMSL7R3897
Add Google Analytics gtag integration for measurement ID G-SMSL7R3897. This inserts an async external gtag.js script and an inline init/config script (dataLayer setup and gtag('config', ...)) into the Docusaurus config tags array to enable tracking alongside the existing G-GH4HMEGEZD setup.
1 parent 2e17f05 commit 41d53d9

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

docusaurus.config.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,23 @@ const config: Config = {
6868
gtag('config', 'G-GH4HMEGEZD');
6969
`,
7070
},
71+
{
72+
tagName: "script",
73+
attributes: {
74+
async: "true",
75+
src: "https://www.googletagmanager.com/gtag/js?id=G-SMSL7R3897",
76+
},
77+
},
78+
{
79+
tagName: "script",
80+
attributes: {},
81+
innerHTML: `
82+
window.dataLayer = window.dataLayer || [];
83+
function gtag(){dataLayer.push(arguments);}
84+
gtag('js', new Date());
85+
gtag('config', 'G-SMSL7R3897');
86+
`,
87+
},
7188
],
7289

7390
presets: [

0 commit comments

Comments
 (0)