瀏覽代碼

remove gtag

AykutSarac 3 年之前
父節點
當前提交
134693dc06
共有 3 個文件被更改,包括 3 次插入20 次删除
  1. 1 1
      next.config.js
  2. 0 0
      public/sw.js.map
  3. 2 19
      src/pages/_document.tsx

+ 1 - 1
next.config.js

@@ -16,7 +16,7 @@ const nextConfig = {
   pwa: {
     dest: "public",
     register: true,
-    scope: '/editor'
+    scope: "/editor",
   },
 };
 

文件差異過大導致無法顯示
+ 0 - 0
public/sw.js.map


+ 2 - 19
src/pages/_document.tsx

@@ -39,23 +39,8 @@ class MyDocument extends Document {
     return (
       <Html lang="en">
         <Head>
-          {!isDevelopment && (
-            <>
-              <script
-                async
-                src="https://www.googletagmanager.com/gtag/js?id=G-JKZEHMJBMH"
-              />
-              <script
-                dangerouslySetInnerHTML={{
-                  __html: `window.dataLayer = window.dataLayer || [];
-                          function gtag(){dataLayer.push(arguments);}
-                          gtag('js', new Date());
-                          gtag('config', 'G-JKZEHMJBMH');
-                    `,
-                }}
-              />
-            </>
-          )}
+          <link rel="manifest" href="/manifest.json" />
+          <meta name="theme-color" content="#36393E" />
           <SeoTags
             description="Simple visualization tool for your JSON data. No forced structure, paste your JSON and view it instantly."
             title="JSON Visio - Directly onto graphs"
@@ -72,8 +57,6 @@ class MyDocument extends Document {
             href="https://fonts.googleapis.com/css2?family=Catamaran:wght@300;400;500;600;700&family=PT+Sans:wght@400;500;700&display=swap"
             rel="stylesheet"
           />
-          <link rel="manifest" href="/manifest.json" />
-          <meta name="theme-color" content="#36393E" />
         </Head>
         <body>
           <Main />

部分文件因文件數量過多而無法顯示