Skip to content

Commit c466504

Browse files
authored
Add clicky analytics (luizdepra#856)
### Prerequisites Put an `x` into the box(es) that apply: - [ ] This pull request fixes a bug. - [x] This pull request adds a feature. - [ ] This pull request introduces breaking change. ### Description Add script tag with `async` and `data-id` attributes for clicky analytics. See https://clicky.com The hugo-coder lacks of clicky analytics integration, which I'm currently using. ### Checklist Put an `x` into the box(es) that apply: #### General - [x] Describe what changes are being made - [x] Explain why and how the changes were necessary and implemented respectively - [ ] Reference issue with `#<ISSUE_NO>` if applicable #### Resources - [ ] If you have changed any SCSS code, run `make release` to regenerate all CSS files #### Contributors - [x] Add yourself to `CONTRIBUTORS.md` if you aren't on it already
1 parent e35f1da commit c466504

File tree

5 files changed

+14
-1
lines changed

5 files changed

+14
-1
lines changed

CONTRIBUTORS.md

+1
Original file line numberDiff line numberDiff line change
@@ -134,3 +134,4 @@
134134
- [Todor Bogosavljević](https://github.com/tbx1b)
135135
- [Kemal Akkoyun](https://github.com/kakkoyun)
136136
- [Igetin](https://github.com/Igetin)
137+
- [Kirill Che.](https://github.com/g4s8)

docs/analytics.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
* [Application Insights](https://azure.com/) - [documentation](/docs/analytics/applicationinsights.md)
88
* [Baidu Analytics](https://tongji.baidu.com/) - [documentation](/docs/analytics/baidu.md)
9+
* [Clicky](https://clicky.com/) - [documentation](/docs/analytics/clicky.md)
910
* [Cloudflare](https://www.cloudflare.com/analytics/) - [documentation](/docs/analytics/cloudflare.md)
1011
* [Google Analytics](https://developers.google.com/analytics) - [documentation](/docs/analytics/googleanalytics.md)
1112
* [Google Tag Manager](https://developers.google.com/tag-manager) - [documentation](/docs/analytics/googletagmanager.md)
@@ -16,4 +17,4 @@
1617
* [Pirsch](https://pirsch.io/) - [documentation](/docs/analytics/pirsch.md)
1718
* [Plausible Analytics](https://plausible.io/) - [documentation](/docs/analytics/plausible.md)
1819
* [Umami](https://umami.is/) - [documentation](/docs/analytics/umami.md)
19-
* [Wide Angle Analytics](https://wideangle.co/) - [documentation](/docs/analytics/wideangle.md)
20+
* [Wide Angle Analytics](https://wideangle.co/) - [documentation](/docs/analytics/wideangle.md)

docs/analytics/clicky.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Clicky
2+
3+
```toml
4+
[params.clicky]
5+
id = "site-id"
6+
```

layouts/_default/baseof.html

+4
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@
116116
{{- partial "analytics/pirsch" . -}}
117117
{{ end }}
118118

119+
{{ if and .Site.Params.clicky .Site.Params.clicky.id }}
120+
{{- partial "analytics/clicky" . -}}
121+
{{ end }}
122+
119123
{{- partial "body/extensions" . -}}
120124
</body>
121125

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<script async data-id="{{ $.Site.Params.clicky.id }}" src="//static.getclicky.com/js"></script>

0 commit comments

Comments
 (0)