diff --git a/README.md b/README.md index c50d4090..b4c102d1 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,11 @@ I don't know why 🤷 - Optimized SEO performance with a correct **SEO SCHEMA** based on JSON-LD - **[Google Analytics](https://analytics.google.com/analytics)** supported - **[Fathom Analytics](https://usefathom.com/)** supported +- **[Baidu Analytics](https://tongji.baidu.com/)** supported +- **[Umami Analytics](https://umami.is/)** supported +- **[Plausible Analytics](https://plausible.io/)** supported +- **[Cloudflare Web Analytics](https://www.cloudflare.com/web-analytics)** supported +- **[Splitbee Analytics](https://splitbee.io)** supported - Search engine **verification** supported (Google, Bing, Yandex, Pinterest, Baidu, 360 and Sogou) - **CDN** for third-party libraries supported diff --git a/README.zh-cn.md b/README.zh-cn.md index 501887af..d39b13d3 100644 --- a/README.zh-cn.md +++ b/README.zh-cn.md @@ -65,6 +65,11 @@ - 使用基于 JSON-LD 格式 的 **SEO SCHEMA** 文件进行 SEO 优化 - 支持 **[Google Analytics](https://analytics.google.com/analytics)** - 支持 **[Fathom Analytics](https://usefathom.com/)** +- 支持 **[百度统计](https://tongji.baidu.com/)** +- 支持 **[Umami Analytics](https://umami.is/)** +- 支持 **[Plausible Analytics](https://plausible.io/)** +- 支持 **[Cloudflare Web Analytics](https://www.cloudflare.com/web-analytics)** +- 支持 **[Splitbee Analytics](https://splitbee.io)** - 支持搜索引擎的**网站验证** (Google, Bing, Yandex, Pinterest, Baidu, 360 and Sogou) - 支持所有第三方库的 **CDN** diff --git a/hugo.toml b/hugo.toml index 9d729625..2268c36a 100644 --- a/hugo.toml +++ b/hugo.toml @@ -777,6 +777,31 @@ enableEmoji = true id = "" # server url for your tracker if you're self hosting server = "" + # FixIt 0.3.16 | NEW Baidu Analytics + [params.analytics.baidu] + id = "" + # FixIt 0.3.16 | NEW Umami Analytics + [params.analytics.umami] + data_website_id = "" + src = "" + data_host_url = "" + data_domains = "" + # FixIt 0.3.16 | NEW Plausible Analytics + [params.analytics.plausible] + data_domain = "" + src = "" + # FixIt 0.3.16 | NEW Cloudflare Analytics + [params.analytics.cloudflare] + token = "" + # FixIt 0.3.16 | NEW Splitbee Analytics + [params.analytics.splitbee] + enable = false + # no cookie mode + no_cookie = true + # respect the do not track setting of the browser + do_not_track = true + # token(optional), more info on https://splitbee.io/docs/embed-the-script + data_token = "" # Cookie consent config [params.cookieconsent] diff --git a/i18n/en.toml b/i18n/en.toml index 8af9099d..2347e8e0 100644 --- a/i18n/en.toml +++ b/i18n/en.toml @@ -6,7 +6,7 @@ configurationError = "Configuration Error\nYou haven't configured the FixIt version param correctly yet. See https://fixit.lruihao.cn/documentation/basics/#theme-configuration" compatibilityError = "Compatibility Error ({{ .From }} -> {{ .To }}):\nYou have an incompatible update. See https://github.com/hugo-fixit/FixIt/releases" devVersionWarn = "You are using a development version of FixIt. Please consider using a stable version.\nSee https://github.com/hugo-fixit/FixIt/releases" -devEnvWarn = "Current environment is \"development\". The \"comment system\", \"PWA\", \"CDN\" and \"fingerprint\" will be disabled." +devEnvWarn = "Current environment is \"development\". The \"comment system\", \"PWA\", \"CDN\", \"fingerprint\" and \"analytics\" will be disabled." quicklyUpgrade = "Quickly upgrade use command: " # === init === diff --git a/i18n/fr.toml b/i18n/fr.toml index a2a3b115..3f686405 100644 --- a/i18n/fr.toml +++ b/i18n/fr.toml @@ -7,7 +7,7 @@ configurationError = "Erreur de configuration\nVous n'avez pas configuré la version de FixIt correctement. Voir https://fixit.lruihao.cn/documentation/basics/#theme-configuration" compatibilityError = "Erreur de compatibilité ({{ .From }} -> {{ .To }}):\nVous avez une mise à jour incompatible. Voir https://github.com/hugo-fixit/FixIt/releases" devVersionWarn = "Vous utilisez une version de développement de FixIt. Veuillez considérer l'utilisation d'une version stable.\nVoir https://github.com/hugo-fixit/FixIt/releases" -devEnvWarn = "L'environnement actuel est \"développement\". Le \"système de commentaires\", le \"PWA\", le \"CDN\" et la \"prise d'empreinte\" seront désactivés." +devEnvWarn = "L'environnement actuel est \"développement\". Le \"système de commentaires\", le \"PWA\", le \"CDN\", le \"prise d'empreinte\" et la \"analyses\" seront désactivés." quicklyUpgrade = "La mise à jour rapide utilise la commande: " # === init === diff --git a/i18n/hi.toml b/i18n/hi.toml index 1ef3a376..cd7deebc 100644 --- a/i18n/hi.toml +++ b/i18n/hi.toml @@ -7,7 +7,7 @@ configurationError = "कन्फ़िग्यरेशन त्रुटि \nआपने फिक्सइट संस्करण पैरामीटर को सही ढंग से कॉन्फ़िगर नहीं किया है।. यह देखें: https://fixit.lruihao.cn/documentation/basics/#theme-configuration" compatibilityError = "संगतता त्रुटि ({{ .From }} -> {{ .To }}):\nआपके पास एक असंगत अपडेट है. यह देखें: https://github.com/hugo-fixit/FixIt/releases" devVersionWarn = "आप फिक्सइट के डिवेलपर संस्करण का उपयोग कर रहे हैं। कृपया एक स्थिर संस्करण का उपयोग करने पर विचार करें।\nयह देखें: https://github.com/hugo-fixit/FixIt/releases" -devEnvWarn = "वर्तमान परिवेश \"डिवेलप्मेंट\" का है। \"टिप्पणी प्रणाली\", \"पीडब्ल्यूए\", \"सीडीएन\" और \"फ़िंगरप्रिंट\" अक्षम कर दिए जाएंगे। " +devEnvWarn = "वर्तमान परिवेश \"डिवेलप्मेंट\" का है। \"टिप्पणी प्रणाली\", \"पीडब्ल्यूए\", \"सीडीएन\", \"फ़िंगरप्रिंट\" और \"विश्लेषण\" अक्षम कर दिए जाएंगे।" quicklyUpgrade = "शीघ्रता से अपग्रेड यह कमांड का उपयोग करें: " # === init === diff --git a/i18n/zh-CN.toml b/i18n/zh-CN.toml index 03524599..9eab9a04 100644 --- a/i18n/zh-CN.toml +++ b/i18n/zh-CN.toml @@ -7,7 +7,7 @@ configurationError = "配置文件错误\n您还没有正确配置 FixIt 的版本参数。参考 https://fixit.lruihao.cn/zh-cn/documentation/basics/#theme-configuration" compatibilityError = "兼容性错误 ({{ .From }} -> {{ .To }}):\n您进行了一次不兼容的更新。参考 https://github.com/hugo-fixit/FixIt/releases" devVersionWarn = "您正在使用开发版的 FixIt,请考虑使用稳定版。\n见 https://github.com/hugo-fixit/FixIt/releases" -devEnvWarn = "当前运行环境是“development”。“评论系统”、“PWA”、“CDN”和“fingerprint”不会启用。" +devEnvWarn = "当前运行环境是“development”。“评论系统”、“PWA”、“CDN”、“fingerprint”和“统计”不会启用。" quicklyUpgrade = "使用命令快速升级:" # === init === diff --git a/i18n/zh-TW.toml b/i18n/zh-TW.toml index 6ee437bc..eb2c63d8 100644 --- a/i18n/zh-TW.toml +++ b/i18n/zh-TW.toml @@ -7,7 +7,7 @@ configurationError = "配置文件錯誤\n您還沒有正確配置 FixIt 的版本參數。參考 https://fixit.lruihao.cn/zh-cn/documentation/basics/#theme-configuration" compatibilityError = "兼容性錯誤 ({{ .From }} -> {{ .To }}):\n您進行了一次不兼容的更新。参考 https://github.com/hugo-fixit/FixIt/releases" devVersionWarn = "您正在使用開發版的 FixIt,請考慮使用穩定版。\n見 https://github.com/hugo-fixit/FixIt/releases" -devEnvWarn = "當前運行環境是“development”。“評論系統”、“PWA”、“CDN”和“fingerprint”不會啟用。" +devEnvWarn = "當前運行環境是“development”。“評論系統”、“PWA”、“CDN”、“fingerprint”和“統計”不會啟用。" quicklyUpgrade = "使用命令快速升級:" # === init === diff --git a/layouts/partials/init/index.html b/layouts/partials/init/index.html index ca2116ef..4122f9e7 100644 --- a/layouts/partials/init/index.html +++ b/layouts/partials/init/index.html @@ -1,4 +1,4 @@ -{{- .Scratch.Set "version" "v0.3.16-0ed41783" -}} +{{- .Scratch.Set "version" "v0.3.16-f1ba78ef" -}} {{- .Scratch.Set "this" dict -}} {{- partial "init/detection-env.html" . -}} diff --git a/layouts/partials/plugin/analytics.html b/layouts/partials/plugin/analytics.html index 58f9bf0b..33c4edfe 100644 --- a/layouts/partials/plugin/analytics.html +++ b/layouts/partials/plugin/analytics.html @@ -19,4 +19,47 @@ {{- dict "Source" ($analytics.fathom.server | default "cdn.usefathom.com" | printf "https://%v/tracker.js") "Async" true "Attr" "id=fathom-script" | partial "plugin/script.html" -}} {{- end -}} + + {{- /* Baidu Analytics */ -}} + {{- with $analytics.baidu.id -}} + + {{- end -}} + + {{- /* Umami Analytics */ -}} + {{- with $analytics.umami.data_website_id -}} + + {{- end -}} + + {{- /* Plausible Analytics */ -}} + {{- with $analytics.plausible.data_domain -}} + + {{- end -}} + + {{- /* Cloudflare Analytics */ -}} + {{- with $analytics.cloudflare.token -}} + + {{- end -}} + + {{- /* Splitbee Analytics */ -}} + {{- if $analytics.splitbee.enable -}} + {{- $attr := "" -}} + {{- if $analytics.splitbee.do_not_track -}} + {{- $attr = printf `%v data-respect-dnt` $attr -}} + {{- end -}} + {{- if $analytics.splitbee.no_cookie -}} + {{- $attr = printf `%v data-no-cookie` $attr -}} + {{- end -}} + {{- with $analytics.splitbee.data_token -}} + {{- $attr = printf `%v data-token="%v"` $attr . -}} + {{- end -}} + + {{- end -}} {{- end -}}