Skip to content

Commit

Permalink
Add support for onedollarstats analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
Olshansk authored and Luiz F. A. de Prá committed Dec 1, 2024
1 parent a7d9dce commit f4a8167
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 16 deletions.
33 changes: 17 additions & 16 deletions docs/analytics.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,21 @@

## Supported Providers

*in alphabetic order*
_in alphabetic order_

* [Application Insights](https://azure.com/) - [documentation](/docs/analytics/applicationinsights.md)
* [Baidu Analytics](https://tongji.baidu.com/) - [documentation](/docs/analytics/baidu.md)
* [Clicky](https://clicky.com/) - [documentation](/docs/analytics/clicky.md)
* [Cloudflare](https://www.cloudflare.com/analytics/) - [documentation](/docs/analytics/cloudflare.md)
* [Google Analytics](https://developers.google.com/analytics) - [documentation](/docs/analytics/googleanalytics.md)
* [Google Tag Manager](https://developers.google.com/tag-manager) - [documentation](/docs/analytics/googletagmanager.md)
* [Fathom Analytics](https://usefathom.com/) - [documentation](/docs/analytics/fathom.md)
* [Goat Counter](https://www.goatcounter.com/) - [documentation](/docs/analytics/goatcounter.md)
* [Matomo](https://matomo.org/) - [documentation](/docs/analytics/matomo.md)
* [Micro Analytics](https://microanalytics.io/) - [documentation](/docs/analytics/microanalytics.md)
* [Pirsch](https://pirsch.io/) - [documentation](/docs/analytics/pirsch.md)
* [Plausible Analytics](https://plausible.io/) - [documentation](/docs/analytics/plausible.md)
* [Umami](https://umami.is/) - [documentation](/docs/analytics/umami.md)
* [Vercel Analytics](https://vercel.com/analytics) - [documentation](/docs/analytics/vercel.md)
* [Wide Angle Analytics](https://wideangle.co/) - [documentation](/docs/analytics/wideangle.md)
- [Application Insights](https://azure.com/) - [documentation](/docs/analytics/applicationinsights.md)
- [Baidu Analytics](https://tongji.baidu.com/) - [documentation](/docs/analytics/baidu.md)
- [Clicky](https://clicky.com/) - [documentation](/docs/analytics/clicky.md)
- [Cloudflare](https://www.cloudflare.com/analytics/) - [documentation](/docs/analytics/cloudflare.md)
- [Google Analytics](https://developers.google.com/analytics) - [documentation](/docs/analytics/googleanalytics.md)
- [Google Tag Manager](https://developers.google.com/tag-manager) - [documentation](/docs/analytics/googletagmanager.md)
- [Fathom Analytics](https://usefathom.com/) - [documentation](/docs/analytics/fathom.md)
- [Goat Counter](https://www.goatcounter.com/) - [documentation](/docs/analytics/goatcounter.md)
- [Matomo](https://matomo.org/) - [documentation](/docs/analytics/matomo.md)
- [Micro Analytics](https://microanalytics.io/) - [documentation](/docs/analytics/microanalytics.md)
- [Pirsch](https://pirsch.io/) - [documentation](/docs/analytics/pirsch.md)
- [Plausible Analytics](https://plausible.io/) - [documentation](/docs/analytics/plausible.md)
- [Umami](https://umami.is/) - [documentation](/docs/analytics/umami.md)
- [Vercel Analytics](https://vercel.com/analytics) - [documentation](/docs/analytics/vercel.md)
- [Wide Angle Analytics](https://wideangle.co/) - [documentation](/docs/analytics/wideangle.md)
- [One Dollars Stats](https://onedollarstats.com/analytics) - [documentation](/docs/analytics/onedollarstats.md)
6 changes: 6 additions & 0 deletions docs/analytics/onedollarstats.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# One Dollars Stats

```toml
[params.onedollarstats]
id = "data-site-id"
```
4 changes: 4 additions & 0 deletions exampleSite/hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ customRemoteJS = []
# siteID = "ABCDE"
# scriptURL = "analytics.REGION.umami.is/SCRIPTNAME.js"

# If you want to use One Dollars Stats(https://onedollarstats.com/analytics) for analytics, add this section
# [params.onedollarstats]
# id = "data-site-id"

# If you want to implement a Content-Security-Policy, add this section
# [params.csp]
# childsrc = ["'self'"]
Expand Down
4 changes: 4 additions & 0 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@
{{- partial "analytics/microanalyticsio" . -}}
{{ end }}

{{ if and .Site.Params.onedollarstats .Site.Params.onedollarstats.id }}
{{- partial "analytics/onedollarstats" . -}}
{{ end }}

{{ if .Site.Params.vercelAnalytics}}
{{- partial "analytics/vercel" . -}}
{{ end }}
Expand Down
5 changes: 5 additions & 0 deletions layouts/partials/analytics/onedollarstats.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<script
defer
data-site-id="{{ .Site.Params.onedollarstats.id }}"
src="https://assets.onedollarstats.com/tracker.js"
></script>

0 comments on commit f4a8167

Please sign in to comment.