Skip to content

Commit

Permalink
chore: add GA
Browse files Browse the repository at this point in the history
  • Loading branch information
guanbinrui committed Mar 6, 2024
1 parent aef5405 commit aaf3978
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/components/GA.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
'use client';

/* cspell:disable */

import { Script } from '@/esm/Script.js';

export function GA() {
return (
<>
<Script async src="https://www.googletagmanager.com/gtag/js?id=G-8TBMFS8K72" />
<Script id="ga">
{`
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-8TBMFS8K72');
`}
</Script>
</>
);
}

0 comments on commit aaf3978

Please sign in to comment.