From 3807bf5915ab199ad08df47aa4068de479c9f343 Mon Sep 17 00:00:00 2001 From: Nimrod Gutman Date: Fri, 17 Jul 2020 12:15:40 +0300 Subject: [PATCH 1/2] add support for Plausible Analytics --- README.md | 1 + exampleSite/config.toml | 3 +++ layouts/partials/plugin/analytics.html | 5 +++++ 3 files changed, 9 insertions(+) diff --git a/README.md b/README.md index 76a9d14..1c25b18 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,7 @@ I hope you will LoveIt ❤️! * 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) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index d87632c..e49be1c 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -999,6 +999,9 @@ enableEmoji = true # server url for your tracker if you're self hosting # 自行托管追踪器时的主机路径 server = "" + # Plausible Analytics + [params.analytics.plausible] + dataDomain = "" # Cookie consent config # Cookie 许可配置 diff --git a/layouts/partials/plugin/analytics.html b/layouts/partials/plugin/analytics.html index c4c21fa..944d3d6 100644 --- a/layouts/partials/plugin/analytics.html +++ b/layouts/partials/plugin/analytics.html @@ -19,4 +19,9 @@ {{- 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.dataDomain -}} + + {{- end -}} {{- end -}} From cbb4e2259055e2f1e803e329b546bb30d6cb3093 Mon Sep 17 00:00:00 2001 From: Dillon Date: Wed, 18 May 2022 23:20:46 +0800 Subject: [PATCH 2/2] chore: Plausible Analytics in docs --- README.zh-cn.md | 1 + config.toml | 3 +++ exampleSite/content/about/index.en.md | 1 + exampleSite/content/about/index.zh-cn.md | 1 + .../content/posts/theme-documentation-basics/index.en.md | 3 +++ .../content/posts/theme-documentation-basics/index.zh-cn.md | 3 +++ 6 files changed, 12 insertions(+) diff --git a/README.zh-cn.md b/README.zh-cn.md index 51542b3..2f634fd 100644 --- a/README.zh-cn.md +++ b/README.zh-cn.md @@ -60,6 +60,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) 自动转换图片为**懒加载** diff --git a/config.toml b/config.toml index a3b5b27..290eb31 100644 --- a/config.toml +++ b/config.toml @@ -541,6 +541,9 @@ # server url for your tracker if you're self hosting # 自行托管追踪器时的主机路径 server = "" + # Plausible Analytics + [params.analytics.plausible] + dataDomain = "" # Cookie consent config # Cookie 许可配置 diff --git a/exampleSite/content/about/index.en.md b/exampleSite/content/about/index.en.md index 85ee34e..600d23e 100644 --- a/exampleSite/content/about/index.en.md +++ b/exampleSite/content/about/index.en.md @@ -33,6 +33,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-column fa-fw): **[Plausible Analytics](https://plausible.io/)** 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 * :(fas fa-cloud-download-alt fa-fw): Automatically converted images with **Lazy Load** by [lazysizes](https://github.com/aFarkas/lazysizes) diff --git a/exampleSite/content/about/index.zh-cn.md b/exampleSite/content/about/index.zh-cn.md index 358e5ca..0630de8 100644 --- a/exampleSite/content/about/index.zh-cn.md +++ b/exampleSite/content/about/index.zh-cn.md @@ -33,6 +33,7 @@ math: * :(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-column fa-fw): 支持 **[Plausible Analytics](https://plausible.io/)** * :(fas fa-sitemap 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) 自动转换图片为**懒加载** diff --git a/exampleSite/content/posts/theme-documentation-basics/index.en.md b/exampleSite/content/posts/theme-documentation-basics/index.en.md index a945c99..0eb7747 100644 --- a/exampleSite/content/posts/theme-documentation-basics/index.en.md +++ b/exampleSite/content/posts/theme-documentation-basics/index.en.md @@ -622,6 +622,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] + dataDomain = "" # {{< version 0.2.7 >}} Cookie consent config [params.cookieconsent] 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 0f8abf0..687463e 100644 --- a/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md +++ b/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md @@ -624,6 +624,9 @@ hugo id = "" # 自行托管追踪器时的主机路径 server = "" + # Plausible Analytics + [params.analytics.plausible] + dataDomain = "" # {{< version 0.2.7 >}} Cookie 许可配置 [params.cookieconsent]