Strek
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
12 additions and
9 deletions
-
beta/.env.development
-
beta/src/pages/_app.tsx
|
|
@ -1,3 +1,2 @@ |
|
|
|
NEXT_PUBLIC_HJ_SITE_ID = 2411683 |
|
|
|
NEXT_PUBLIC_HJ_SITE_V = 6 |
|
|
|
NEXT_PUBLIC_GA_TRACKING_ID = 'G-3918VS75Y6' |
|
|
|
NEXT_PUBLIC_HJ_SITE_V = 6 |
|
|
@ -30,12 +30,14 @@ export default function MyApp({Component, pageProps}: AppProps) { |
|
|
|
return ( |
|
|
|
<AppShell> |
|
|
|
<Component {...pageProps} /> |
|
|
|
<Script |
|
|
|
strategy="lazyOnload" |
|
|
|
src={`https://www.googletagmanager.com/gtag/js?id=${process.env.NEXT_PUBLIC_GA_TRACKING_ID}`} |
|
|
|
/> |
|
|
|
<Script id="google-analytics" strategy="lazyOnload"> |
|
|
|
{` |
|
|
|
{process.env.NODE_ENV === 'production' && ( |
|
|
|
<> |
|
|
|
<Script |
|
|
|
strategy="lazyOnload" |
|
|
|
src={`https://www.googletagmanager.com/gtag/js?id=${process.env.NEXT_PUBLIC_GA_TRACKING_ID}`} |
|
|
|
/> |
|
|
|
<Script id="google-analytics" strategy="lazyOnload"> |
|
|
|
{` |
|
|
|
window.dataLayer = window.dataLayer || []; |
|
|
|
function gtag(){dataLayer.push(arguments);} |
|
|
|
gtag('js', new Date()); |
|
|
@ -43,7 +45,9 @@ export default function MyApp({Component, pageProps}: AppProps) { |
|
|
|
page_path: window.location.pathname, |
|
|
|
}); |
|
|
|
`}
|
|
|
|
</Script> |
|
|
|
</Script> |
|
|
|
</> |
|
|
|
)} |
|
|
|
</AppShell> |
|
|
|
); |
|
|
|
} |
|
|
|