Browse Source

Removed google analytics for dev (#4233)

main
Strek 3 years ago
committed by GitHub
parent
commit
51105970b7
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      beta/.env.development
  2. 4
      beta/src/pages/_app.tsx

1
beta/.env.development

@ -1,3 +1,2 @@
NEXT_PUBLIC_HJ_SITE_ID = 2411683
NEXT_PUBLIC_HJ_SITE_V = 6
NEXT_PUBLIC_GA_TRACKING_ID = 'G-3918VS75Y6'

4
beta/src/pages/_app.tsx

@ -30,6 +30,8 @@ export default function MyApp({Component, pageProps}: AppProps) {
return (
<AppShell>
<Component {...pageProps} />
{process.env.NODE_ENV === 'production' && (
<>
<Script
strategy="lazyOnload"
src={`https://www.googletagmanager.com/gtag/js?id=${process.env.NEXT_PUBLIC_GA_TRACKING_ID}`}
@ -44,6 +46,8 @@ export default function MyApp({Component, pageProps}: AppProps) {
});
`}
</Script>
</>
)}
</AppShell>
);
}

Loading…
Cancel
Save