Skip to content

Commit

Permalink
📈 add ga
Browse files Browse the repository at this point in the history
  • Loading branch information
gmpetrov committed Mar 28, 2023
1 parent 62fbd72 commit 8966e65
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import Document, {
Main,
NextScript,
} from 'next/document';
import Script from 'next/script';

class CustomDocument extends Document {
static async getInitialProps(ctx: DocumentContext) {
Expand All @@ -27,6 +28,20 @@ class CustomDocument extends Document {
href="https://fonts.googleapis.com/css2?family=Josefin+Sans:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&display=swap"
rel="stylesheet"
/>

<Script
src="https://www.googletagmanager.com/gtag/js?id=G-QTN3QP6PKB"
strategy="afterInteractive"
/>
<Script id="google-analytics" strategy="afterInteractive">
{`
window.dataLayer = window.dataLayer || [];
function gtag(){window.dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-QTN3QP6PKB');
`}
</Script>
</Head>
<body>
{getInitColorSchemeScript()}
Expand Down

1 comment on commit 8966e65

@vercel
Copy link

@vercel vercel bot commented on 8966e65 Mar 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.