diff --git a/README.md b/README.md index 76a9d149..1c25b18f 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 d87632c1..e49be1c7 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 c4c21fad..944d3d6a 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 -}}