diff --git a/pages/_document.tsx b/pages/_document.tsx index 0cca7a2..ce9a511 100644 --- a/pages/_document.tsx +++ b/pages/_document.tsx @@ -23,10 +23,18 @@ class MyDocument extends Document { dangerouslySetInnerHTML={{ __html: ` window.dataLayer = window.dataLayer || []; - function gtag(){dataLayer.push(arguments);} + function gtag(){window.dataLayer.push(arguments);} gtag('js', new Date()); - gtag('config', 'UA-165454387-1');`, + gtag('config', 'UA-165454387-1'); + + if(/MSIE \\d|Trident.*rv:/.test(navigator.userAgent)) { + window.location = 'microsoft-edge:' + window.location; + setTimeout(function() { + window.location = 'https://go.microsoft.com/fwlink/?linkid=2135547'; + }, 1); + } + `, }} />