This is an automated email from the ASF dual-hosted git repository.
psxjoy pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/fesod.git
The following commit(s) were added to refs/heads/main by this push:
new f8b8fd0c Revert "feat: add analytics module for tracking page views
(#635)" (#637)
f8b8fd0c is described below
commit f8b8fd0c1f55220cb010362da247c9ed5a9d5765
Author: DeleiGuo <[email protected]>
AuthorDate: Fri Oct 10 11:15:44 2025 +0800
Revert "feat: add analytics module for tracking page views (#635)" (#637)
This reverts commit 1d5e1b9401ecbfbac2d8704d6a56305f7c47e536.
---
website/docusaurus.config.js | 1 -
website/src/analytics.ts | 63 --------------------------------------------
website/static/config.json | 3 ---
3 files changed, 67 deletions(-)
diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js
index 02594503..83c22bd1 100644
--- a/website/docusaurus.config.js
+++ b/website/docusaurus.config.js
@@ -35,7 +35,6 @@ const config = {
customFields: {
repoUrl,
},
- clientModules: [require.resolve('./src/analytics.ts')],
i18n: {
defaultLocale: 'en',
locales: ['en', 'zh-cn'],
diff --git a/website/src/analytics.ts b/website/src/analytics.ts
deleted file mode 100644
index 85eb8d1b..00000000
--- a/website/src/analytics.ts
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import ExecutionEnvironment from '@docusaurus/ExecutionEnvironment';
-
-(function () {
- if (ExecutionEnvironment.canUseDOM) {
- let prefix = '';
- if (location.pathname.startsWith('/zh-cn')) {
- prefix = '/zh-cn';
- }
- let s = document.getElementsByTagName('script')[0];
-
- let matomo = document.createElement('script');
- matomo.text = `
- /* -- Matomo */
- var _paq = window._paq = window._paq || [];
- /* tracker methods like "setCustomDimension" should be called before
"trackPageView" */
- /* _paq.push(["setDoNotTrack", true]); */
- _paq.push(["disableCookies"]);
- _paq.push(['trackPageView']);
- _paq.push(['enableLinkTracking']);
- (function() {
- var u="https://analytics.apache.org/";
- _paq.push(['setTrackerUrl', u+'matomo.php']);
- _paq.push(['setSiteId', '83']);
- var d=document, g=d.createElement('script'),
s=d.getElementsByTagName('script')[0];
- g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
- })();
- /* End Matomo Code */
- `;
- s.parentNode.insertBefore(matomo, s);
-
- const controller = new AbortController();
- const signal = controller.signal;
- // set timeout
- setTimeout(() => {
- controller.abort();
- }, 5000);
- fetch(prefix + '/config.json', {signal})
- .then((res) => res.json())
- .then((data) => {
- if (data.analytics) {
- }
- }).catch((err => {
- // do nothing
- }));
- }
-})();
\ No newline at end of file
diff --git a/website/static/config.json b/website/static/config.json
deleted file mode 100644
index 250baa88..00000000
--- a/website/static/config.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "analytics": true
-}
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]