This is an automated email from the ASF dual-hosted git repository.

jimin pushed a commit to branch docusaurus
in repository https://gitbox.apache.org/repos/asf/incubator-seata-website.git


The following commit(s) were added to refs/heads/docusaurus by this push:
     new c74c22f1580 optimize: Remove commented out Google & Baidu analytics 
(#938)
c74c22f1580 is described below

commit c74c22f158088dc610baf29e88ca0ee414eca803
Author: Niall Pemberton <niall.pember...@gmail.com>
AuthorDate: Fri Feb 7 02:12:17 2025 +0000

    optimize: Remove commented out Google & Baidu analytics (#938)
---
 404.html             |  8 -------
 docusaurus.config.js | 24 --------------------
 package-lock.json    | 63 ----------------------------------------------------
 src/analytics.ts     | 21 ------------------
 src/custom-js.ts     |  6 -----
 5 files changed, 122 deletions(-)

diff --git a/404.html b/404.html
index d05aa453d4f..8986f46465a 100644
--- a/404.html
+++ b/404.html
@@ -8,8 +8,6 @@
 <script src="//cdn.jsdelivr.net/npm/js-cookie@2/src/js.cookie.min.js"></script>
 <script src="//g.alicdn.com/alilog/mlog/aplus_v2.js" id="beacon-aplus" 
exparams="clog=o&aplus&sidx=aplusSidx&ckx=aplusCkx"></script>
 <script 
src="//g.alicdn.com/aes/??tracker/1.0.34/index.js,tracker-plugin-pv/2.4.5/index.js,tracker-plugin-event/1.2.5/index.js,tracker-plugin-jserror/1.0.13/index.js,tracker-plugin-api/1.1.14/index.js,tracker-plugin-perf/1.1.8/index.js,tracker-plugin-eventTiming/1.0.4/index.js"></script>
-<!-- Google tag (gtag.js) -->
-<!--<script async 
src="https://www.googletagmanager.com/gtag/js?id=G-X4LJGF90X2";></script>-->
 <script>
     window.rootPath = '';
     window.defaultLanguage = 'zh-cn';
@@ -19,11 +17,5 @@
     }
     window.location = window.rootPath + '/' + lang;
 </script>
-<!--<script>-->
-<!--    window.dataLayer = window.dataLayer || [];-->
-<!--    function gtag(){dataLayer.push(arguments);}-->
-<!--    gtag('js', new Date());-->
-<!--    gtag('config', 'G-X4LJGF90X2');-->
-<!--</script>-->
 </body>
 </html>
diff --git a/docusaurus.config.js b/docusaurus.config.js
index 7722b146c31..be7309a5c58 100644
--- a/docusaurus.config.js
+++ b/docusaurus.config.js
@@ -68,30 +68,6 @@ const config = {
       },
     },
   ],
-  // scripts: [
-  //   {
-  //     // src: 'https://www.googletagmanager.com/gtag/js?id=G-X4LJGF90X2',
-  //     src: '/js/gtag.js',
-  //     async: true,
-  //   },
-  //   {
-  //     // src: 'https://hm.baidu.com/hm.js?104e73ef0c18b416b27abb23757ed8ee',
-  //     src: '/js/hm.js',
-  //     async: true,
-  //   },
-  //   {
-  //     // src: 'https://g.alicdn.com/alilog/mlog/aplus_v2.js',
-  //     src: '/js/aplus_v2.js',
-  //     id: 'beacon-aplus',
-  //     exparams: 'clog=o&aplus&sidx=aplusSidx&ckx=aplusCkx',
-  //     defer: true,
-  //   },
-  //   {
-  //     // src: 
'https://g.alicdn.com/aes/??tracker/1.0.34/index.js,tracker-plugin-pv/2.4.5/index.js,tracker-plugin-event/1.2.5/index.js,tracker-plugin-jserror/1.0.13/index.js,tracker-plugin-api/1.1.14/index.js,tracker-plugin-perf/1.1.8/index.js,tracker-plugin-eventTiming/1.0.4/index.js',
-  //     src: '/js/tracker.js',
-  //     defer: true,
-  //   },
-  // ],
   plugins: [
     'docusaurus-plugin-sass',
     [
diff --git a/package-lock.json b/package-lock.json
index 9df3be9f2a3..68f2ac4ea77 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -2531,61 +2531,6 @@
         "react-dom": "^18.0.0"
       }
     },
-    "node_modules/@docusaurus/plugin-google-analytics": {
-      "version": "3.1.1",
-      "resolved": 
"https://registry.npmmirror.com/@docusaurus/plugin-google-analytics/-/plugin-google-analytics-3.1.1.tgz";,
-      "integrity": 
"sha512-+q2UpWTqVi8GdlLoSlD5bS/YpxW+QMoBwrPrUH/NpvpuOi0Of7MTotsQf9JWd3hymZxl2uu1o3PIrbpxfeDFDQ==",
-      "dependencies": {
-        "@docusaurus/core": "3.1.1",
-        "@docusaurus/types": "3.1.1",
-        "@docusaurus/utils-validation": "3.1.1",
-        "tslib": "^2.6.0"
-      },
-      "engines": {
-        "node": ">=18.0"
-      },
-      "peerDependencies": {
-        "react": "^18.0.0",
-        "react-dom": "^18.0.0"
-      }
-    },
-    "node_modules/@docusaurus/plugin-google-gtag": {
-      "version": "3.1.1",
-      "resolved": 
"https://registry.npmmirror.com/@docusaurus/plugin-google-gtag/-/plugin-google-gtag-3.1.1.tgz";,
-      "integrity": 
"sha512-0mMPiBBlQ5LFHTtjxuvt/6yzh8v7OxLi3CbeEsxXZpUzcKO/GC7UA1VOWUoBeQzQL508J12HTAlR3IBU9OofSw==",
-      "dependencies": {
-        "@docusaurus/core": "3.1.1",
-        "@docusaurus/types": "3.1.1",
-        "@docusaurus/utils-validation": "3.1.1",
-        "@types/gtag.js": "^0.0.12",
-        "tslib": "^2.6.0"
-      },
-      "engines": {
-        "node": ">=18.0"
-      },
-      "peerDependencies": {
-        "react": "^18.0.0",
-        "react-dom": "^18.0.0"
-      }
-    },
-    "node_modules/@docusaurus/plugin-google-tag-manager": {
-      "version": "3.1.1",
-      "resolved": 
"https://registry.npmmirror.com/@docusaurus/plugin-google-tag-manager/-/plugin-google-tag-manager-3.1.1.tgz";,
-      "integrity": 
"sha512-d07bsrMLdDIryDtY17DgqYUbjkswZQr8cLWl4tzXrt5OR/T/zxC1SYKajzB3fd87zTu5W5klV5GmUwcNSMXQXA==",
-      "dependencies": {
-        "@docusaurus/core": "3.1.1",
-        "@docusaurus/types": "3.1.1",
-        "@docusaurus/utils-validation": "3.1.1",
-        "tslib": "^2.6.0"
-      },
-      "engines": {
-        "node": ">=18.0"
-      },
-      "peerDependencies": {
-        "react": "^18.0.0",
-        "react-dom": "^18.0.0"
-      }
-    },
     "node_modules/@docusaurus/plugin-sitemap": {
       "version": "3.1.1",
       "resolved": 
"https://registry.npmmirror.com/@docusaurus/plugin-sitemap/-/plugin-sitemap-3.1.1.tgz";,
@@ -2619,9 +2564,6 @@
         "@docusaurus/plugin-content-docs": "3.1.1",
         "@docusaurus/plugin-content-pages": "3.1.1",
         "@docusaurus/plugin-debug": "3.1.1",
-        "@docusaurus/plugin-google-analytics": "3.1.1",
-        "@docusaurus/plugin-google-gtag": "3.1.1",
-        "@docusaurus/plugin-google-tag-manager": "3.1.1",
         "@docusaurus/plugin-sitemap": "3.1.1",
         "@docusaurus/theme-classic": "3.1.1",
         "@docusaurus/theme-common": "3.1.1",
@@ -3617,11 +3559,6 @@
         "@types/send": "*"
       }
     },
-    "node_modules/@types/gtag.js": {
-      "version": "0.0.12",
-      "resolved": 
"https://registry.npmmirror.com/@types/gtag.js/-/gtag.js-0.0.12.tgz";,
-      "integrity": 
"sha512-YQV9bUsemkzG81Ea295/nF/5GijnD2Af7QhEofh7xu+kvCN6RdodgNwwGWXB5GMI3NoyvQo0odNctoH/qLMIpg=="
-    },
     "node_modules/@types/hast": {
       "version": "3.0.4",
       "resolved": 
"https://registry.npmmirror.com/@types/hast/-/hast-3.0.4.tgz";,
diff --git a/src/analytics.ts b/src/analytics.ts
index d1e5f010198..1d78123fdbb 100644
--- a/src/analytics.ts
+++ b/src/analytics.ts
@@ -38,27 +38,6 @@ import ExecutionEnvironment from 
'@docusaurus/ExecutionEnvironment';
       .then((res) => res.json())
       .then((data) => {
         if (data.analytics) {
-          // let gtag = document.createElement('script');
-          // gtag.src = prefix + '/js/gtag.js';
-          // gtag.async = true;
-          // s.parentNode.insertBefore(gtag, s);
-          //
-          // let hm = document.createElement('script');
-          // hm.src = prefix + '/js/hm.js';
-          // hm.async = true;
-          // s.parentNode.insertBefore(hm, s);
-          //
-          // let aplus_v2 = document.createElement('script');
-          // aplus_v2.src = prefix + '/js/aplus_v2.js';
-          // aplus_v2.id = 'beacon-aplus';
-          // aplus_v2.setAttribute('exparams', 
'clog=o&aplus&sidx=aplusSidx&ckx=aplusCkx');
-          // aplus_v2.defer = true;
-          // s.parentNode.insertBefore(aplus_v2, s);
-          //
-          // let tracker = document.createElement('script');
-          // tracker.src = prefix + '/js/tracker.js';
-          // tracker.defer = true;
-          // s.parentNode.insertBefore(tracker, s);
         }
       }).catch((err => {
       // do nothing
diff --git a/src/custom-js.ts b/src/custom-js.ts
index eb9b553e332..31650e0024e 100644
--- a/src/custom-js.ts
+++ b/src/custom-js.ts
@@ -2,10 +2,4 @@ import ExecutionEnvironment from 
'@docusaurus/ExecutionEnvironment';
 
 var _hmt = _hmt || [];
 (function () {
-  // if (ExecutionEnvironment.canUseDOM) {
-  //   var hm = document.createElement('script');
-  //   hm.src = 'https://hm.baidu.com/hm.js?104e73ef0c18b416b27abb23757ed8ee';
-  //   var s = document.getElementsByTagName('script')[0];
-  //   s.parentNode.insertBefore(hm, s);
-  // }
 })();


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@seata.apache.org
For additional commands, e-mail: notifications-h...@seata.apache.org

Reply via email to