diff --git a/README.md b/README.md index d0de81064..5d02012dd 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,7 @@ I hope you will LoveIt ❤️! * **[Google Analytics](https://analytics.google.com/analytics)** supported * **[Fathom Analytics](https://usefathom.com/)** supported * **[Plausible Analytics](https://plausible.io/)** supported +* **[Umami Analytics](https://umami.is/)** supported * **[Yandex Metrica](https://metrica.yandex.com/)** supported * Search engine **verification** supported (Google, Bind, Yandex and Baidu) * **CDN** for third-party libraries supported diff --git a/README.zh-cn.md b/README.zh-cn.md index 1d76eb39f..8af4494e5 100644 --- a/README.zh-cn.md +++ b/README.zh-cn.md @@ -61,6 +61,7 @@ * 支持 **[Google Analytics](https://analytics.google.com/analytics)** * 支持 **[Fathom Analytics](https://usefathom.com/)** * 支持 **[Plausible Analytics](https://plausible.io/)** +* 支持 **[Umami Analytics](https://umami.is/)** * 支持 **[Yandex Metrica](https://metrica.yandex.com/)** * 支持搜索引擎的**网站验证** (Google, Bind, Yandex and Baidu) * 支持所有第三方库的 **CDN** diff --git a/config.toml b/config.toml index 7dd3b9def..8c89d5d07 100644 --- a/config.toml +++ b/config.toml @@ -579,6 +579,10 @@ # Plausible Analytics [params.analytics.plausible] dataDomain = "" + # Umami Analytics + [params.analytics.umami] + src = "" + dataWebsiteId = "" # Yandex Metrica [params.analytics.yandexMetrica] id = "" diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 504cb9e90..c975ddab6 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -664,6 +664,10 @@ ignoreErrors = ["error-remote-getjson", "error-missing-instagram-accesstoken"] # Plausible Analytics [params.analytics.plausible] dataDomain = "" + # Umami Analytics + [params.analytics.umami] + src = "" + dataWebsiteId = "" # Yandex Metrica [params.analytics.yandexMetrica] id = "" diff --git a/exampleSite/content/about/index.en.md b/exampleSite/content/about/index.en.md index 866fbf4f9..888f7ee0f 100644 --- a/exampleSite/content/about/index.en.md +++ b/exampleSite/content/about/index.en.md @@ -34,6 +34,7 @@ math: * :(fab fa-google fa-fw): **[Google Analytics](https://analytics.google.com/analytics)** supported * :(far fa-chart-bar fa-fw): **[Fathom Analytics](https://usefathom.com/)** supported * :(fas fa-chart-column fa-fw): **[Plausible Analytics](https://plausible.io/)** supported +* :(fas fa-chart-pie fa-fw): **[Umami Analytics](https://umami.is/)** supported * :(fab fa-yandex-international fa-fw): **[Yandex Metrica](https://metrica.yandex.com/)** supported * :(fas fa-sitemap fa-fw): Search engine **verification** supported (Google, Bind, Yandex and Baidu) * :(fas fa-tachometer-alt fa-fw): **CDN** for third-party libraries supported diff --git a/exampleSite/content/about/index.zh-cn.md b/exampleSite/content/about/index.zh-cn.md index 21fbe12d0..165b2aafb 100644 --- a/exampleSite/content/about/index.zh-cn.md +++ b/exampleSite/content/about/index.zh-cn.md @@ -34,6 +34,7 @@ math: * :(fab fa-google fa-fw): 支持 **[Google Analytics](https://analytics.google.com/analytics)** * :(far fa-chart-bar fa-fw): 支持 **[Fathom Analytics](https://usefathom.com/)** * :(fas fa-chart-column fa-fw): 支持 **[Plausible Analytics](https://plausible.io/)** +* :(fas fa-chart-pie fa-fw): 支持 **[Umami Analytics](https://umami.is/)** * :(fab fa-yandex-international fa-fw): 支持 **[Yandex Metrica](https://metrica.yandex.com/)** * :(fas fa-sitemap fa-fw): 支持搜索引擎的**网站验证** (Google, Bind, Yandex and Baidu) * :(fas fa-tachometer-alt fa-fw): 支持所有第三方库的 **CDN** diff --git a/exampleSite/content/posts/theme-documentation-basics/index.en.md b/exampleSite/content/posts/theme-documentation-basics/index.en.md index b961a25e5..cc8e00da8 100644 --- a/exampleSite/content/posts/theme-documentation-basics/index.en.md +++ b/exampleSite/content/posts/theme-documentation-basics/index.en.md @@ -723,6 +723,10 @@ ignoreErrors = ["error-remote-getjson", "error-missing-instagram-accesstoken"] # Plausible Analytics [params.analytics.plausible] dataDomain = "" + # Umami Analytics + [params.analytics.umami] + src = "" + dataWebsiteId = "" # Yandex Metrica [params.analytics.yandexMetrica] id = "" diff --git a/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md b/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md index edca2e26a..04f682102 100644 --- a/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md +++ b/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md @@ -725,6 +725,10 @@ ignoreErrors = ["error-remote-getjson", "error-missing-instagram-accesstoken"] # Plausible Analytics [params.analytics.plausible] dataDomain = "" + # Umami Analytics + [params.analytics.umami] + src = "" + dataWebsiteId = "" # Yandex Metrica [params.analytics.yandexMetrica] id = "" diff --git a/layouts/partials/plugin/analytics.html b/layouts/partials/plugin/analytics.html index 9b174ed17..f1ae21f37 100644 --- a/layouts/partials/plugin/analytics.html +++ b/layouts/partials/plugin/analytics.html @@ -25,6 +25,11 @@ {{- dict "Source" "https://plausible.io/js/plausible.js" "Async" true "Defer" true "Attr" ($analytics.plausible.dataDomain | printf `data-domain="%v"`) | partial "plugin/script.html" -}} {{- end -}} + {{- /* Umami Analytics */ -}} + {{- with $analytics.umami.src -}} + {{- dict "Source" $analytics.umami.src "Async" true "Defer" true "Attr" ($analytics.umami.dataWebsiteId | printf `data-website-id="%v"`) | partial "plugin/script.html" -}} + {{- end -}} + {{- /* Yandex Metrica */ -}} {{- with $analytics.yandexMetrica.id -}}