Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add clicky analytics (#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
  • Loading branch information
g4s8 committed Nov 15, 2023
1 parent e35f1da commit c466504
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Expand Up @@ -134,3 +134,4 @@
- [Todor Bogosavljević](https://github.com/tbx1b)
- [Kemal Akkoyun](https://github.com/kakkoyun)
- [Igetin](https://github.com/Igetin)
- [Kirill Che.](https://github.com/g4s8)
3 changes: 2 additions & 1 deletion docs/analytics.md
Expand Up @@ -6,6 +6,7 @@

* [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)
Expand All @@ -16,4 +17,4 @@
* [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)
* [Wide Angle Analytics](https://wideangle.co/) - [documentation](/docs/analytics/wideangle.md)
* [Wide Angle Analytics](https://wideangle.co/) - [documentation](/docs/analytics/wideangle.md)
6 changes: 6 additions & 0 deletions docs/analytics/clicky.md
@@ -0,0 +1,6 @@
# Clicky

```toml
[params.clicky]
id = "site-id"
```
4 changes: 4 additions & 0 deletions layouts/_default/baseof.html
Expand Up @@ -116,6 +116,10 @@
{{- partial "analytics/pirsch" . -}}
{{ end }}

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

{{- partial "body/extensions" . -}}
</body>

Expand Down
1 change: 1 addition & 0 deletions layouts/partials/analytics/clicky.html
@@ -0,0 +1 @@
<script async data-id="{{ $.Site.Params.clicky.id }}" src="//static.getclicky.com/js"></script>

0 comments on commit c466504

Please sign in to comment.