Skip to content
This repository has been archived by the owner on Mar 9, 2022. It is now read-only.

Commit

Permalink
feat: Add Plausible Analytics option
Browse files Browse the repository at this point in the history
  • Loading branch information
Nir Galon authored and victor-pogor committed Dec 26, 2020
1 parent 1c82984 commit 53e045c
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ I hope you will CodeIT 👩‍💻!
- 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
- **[Plausible Analytics](https://plausible.io/)** supported
- Search engine **verification** supported (Google, Bind, Yandex, and Baidu)
- **CDN** for third-party libraries supported
- Automatically converted images with **Lazy Load** by [lazysizes](https://github.com/aFarkas/lazysizes)
Expand Down
1 change: 1 addition & 0 deletions README.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
- 使用基于 JSON-LD 格式 的 **SEO SCHEMA** 文件进行 SEO 优化
- 支持 **[Google Analytics](https://analytics.google.com/analytics)**
- 支持 **[Fathom Analytics](https://usefathom.com/)**
- 支持 **[Plausible Analytics](https://plausible.io/)**
- 支持搜索引擎的**网站验证** (Google, Bind, Yandex and Baidu)
- 支持所有第三方库的 **CDN**
- 基于 [lazysizes](https://github.com/aFarkas/lazysizes) 自动转换图片为**懒加载**
Expand Down
3 changes: 3 additions & 0 deletions exampleSite/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -902,6 +902,9 @@ ignoreErrors = ["error-remote-getjson"]
id = ""
# server url for your tracker if you're self hosting
server = ""
# Plausible Analytics
[params.analytics.plausible]
domain = ""

# Cookie consent config
[params.cookieconsent]
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 @@ -31,6 +31,7 @@ math:
- :(fab fa-searchengin fa-fw): Optimized SEO performance with a correct **SEO SCHEMA** based on JSON-LD
- :(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
- :(far fa-chart-bar fa-fw): **[Plausible Analytics](https://plausible.io/)** supported
- :(fas fa-search fa-fw): Search engine **verification** supported (Google, Bind, Yandex and Baidu)
- :(fas fa-tachometer-alt fa-fw): **CDN** for third-party libraries supported
- :(fas fa-cloud-download-alt fa-fw): Automatically converted images with **Lazy Load** by [lazysizes](https://github.com/aFarkas/lazysizes)
Expand Down
1 change: 1 addition & 0 deletions exampleSite/content/about/index.fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Welcome to take the time to propose a translation by [:(fas fa-code-branch fa-fw
- :(fab fa-searchengin fa-fw): Optimized SEO performance with a correct **SEO SCHEMA** based on JSON-LD
- :(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
- :(far fa-chart-bar fa-fw): **[Plausible Analytics](https://plausible.io/)** supported
- :(fas fa-search fa-fw): Search engine **verification** supported (Google, Bind, Yandex and Baidu)
- :(fas fa-tachometer-alt fa-fw): **CDN** for third-party libraries supported
- :(fas fa-cloud-download-alt fa-fw): Automatically converted images with **Lazy Load** by [lazysizes](https://github.com/aFarkas/lazysizes)
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 @@ -36,6 +36,7 @@ Welcome to take the time to propose a translation by [:(fas fa-code-branch fa-fw
- :(fab fa-searchengin fa-fw): 使用基于 JSON-LD 格式 的 **SEO SCHEMA** 文件进行 SEO 优化
- :(fab fa-google fa-fw): 支持 **[Google Analytics](https://analytics.google.com/analytics)**
- :(far fa-chart-bar fa-fw): 支持 **[Fathom Analytics](https://usefathom.com/)**
- :(far fa-chart-bar fa-fw): 支持 **[Plausible Analytics](https://plausible.io/)**
- :(fas fa-search fa-fw): 支持搜索引擎的**网站验证** (Google, Bind, Yandex and Baidu)
- :(fas fa-tachometer-alt fa-fw): 支持所有第三方库的 **CDN**
- :(fas fa-cloud-download-alt fa-fw): 基于 [lazysizes](https://github.com/aFarkas/lazysizes) 自动转换图片为**懒加载**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,9 @@ Please open the code block below to view the complete sample configuration :(far
id = ""
# server url for your tracker if you're self hosting
server = ""
# Plausible Analytics
[params.analytics.plausible]
domain = ""

# Cookie consent config
[params.cookieconsent]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,9 @@ Please open the code block below to view the complete sample configuration :(far
id = ""
# server url for your tracker if you're self hosting
server = ""
# Plausible Analytics
[params.analytics.plausible]
domain = ""

# Cookie consent config
[params.cookieconsent]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,9 @@ hugo
id = ""
# 自行托管追踪器时的主机路径
server = ""
# Plausible Analytics
[params.analytics.plausible]
domain = ""

# Cookie 许可配置
[params.cookieconsent]
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 @@ -19,4 +19,9 @@
</script>
{{- 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 -}}

{{- /* Plausible Analytics */ -}}
{{- with $analytics.plausible.domain -}}
<script async defer data-domain="{{- $analytics.plausible.domain -}}" src="https://plausible.io/js/plausible.js"></script>
{{- end -}}
{{- end -}}

0 comments on commit 53e045c

Please sign in to comment.