From c89ab5ff4a6476f5f5ee0b8c426ed54b5bd68b94 Mon Sep 17 00:00:00 2001 From: Ritesh Kumar Date: Mon, 22 Jul 2019 19:11:02 +0530 Subject: [PATCH] remove duplicate google tag manager (#122) --- pages/_document.tsx | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/pages/_document.tsx b/pages/_document.tsx index 680ac30..9188e25 100644 --- a/pages/_document.tsx +++ b/pages/_document.tsx @@ -7,22 +7,6 @@ interface DocumentProps { hydrationScript: React.ReactChild; } -function trackingScript() { - // @ts-ignore - if (window.dataLayer) return; - // @ts-ignore - window.dataLayer = window.dataLayer || []; - function gtag() { - // @ts-ignore - window.dataLayer.push(arguments); - } - // @ts-ignore - gtag("js", new Date()); - - // @ts-ignore - gtag("config", "UA-60624235-8"); -} - export default class MyDocument extends Document { static getInitialProps({ renderPage }) { const page = renderPage(); @@ -54,14 +38,6 @@ export default class MyDocument extends Document {
{hydrationScript} - - );