chore: test register ga (#2202)

This commit is contained in:
Joel 2024-01-25 15:52:45 +08:00 committed by GitHub
parent f2b2effc4b
commit bdc5e9ceb0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -38,7 +38,23 @@ gtag('config', '${gaIdMaps[gaType]}');
}}
>
</Script>
{gaType === GaType.admin && (
<>
<Script strategy="beforeInteractive" async src={'https://www.googletagmanager.com/gtag/js?id=AW-11217955271"}'}></Script>
<Script
id="ga-monitor-register"
dangerouslySetInnerHTML={{
__html: `
window.dataLayer2 = window.dataLayer2 || [];
function gtag(){dataLayer2.push(arguments);}
gtag('js', new Date());
gtag('config', 'AW-11217955271"');
`,
}}
>
</Script>
</>
)}
</>
)