Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added supported for umami #761

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions README.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**
Expand Down
4 changes: 4 additions & 0 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,10 @@
# Plausible Analytics
[params.analytics.plausible]
dataDomain = ""
# Umami Analytics
[params.analytics.umami]
src = ""
dataWebsiteId = ""
# Yandex Metrica
[params.analytics.yandexMetrica]
id = ""
Expand Down
4 changes: 4 additions & 0 deletions exampleSite/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ""
Expand Down
1 change: 1 addition & 0 deletions exampleSite/content/about/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions exampleSite/content/about/index.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ""
Expand Down
5 changes: 5 additions & 0 deletions layouts/partials/plugin/analytics.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 -}}
<script type="text/javascript" >
Expand Down