Skip to content

Commit

Permalink
Add self-hosted goat counter (#826)
Browse files Browse the repository at this point in the history
* Add self-hosted goat counter

* GoatCounter custom instance and beckward compatibility

---------

Co-authored-by: SilverLuke <[email protected]>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Oct 31, 2023
1 parent e61d6b7 commit 05c9d3d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions layouts/partials/analytics.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- Add Analytics if enabled in configuration -->
{{ with site.Params.features.analytics }}
{{ if .enabled }}
{{ if or .enable .enabled }}
{{ with .services }}
<!-- Google Analytics -->
{{ with .google }}
Expand All @@ -18,12 +18,12 @@
{{ end }}

<!-- GoatCounter -->
{{ with .goatCounter }}
<script
data-goatcounter="https://{{ .code }}.goatcounter.com/count"
async
src="//gc.zgo.at/count.js"
></script>
{{ with .goatCounter }}
{{ with .code }}
<script data-goatcounter="https://{{ . }}.goatcounter.com/count" async src="//gc.zgo.at/count.js"></script>
{{ else }}
<script data-goatcounter="https://{{ .instance }}/count" async src="https://{{ .instance }}/count.js"></script>
{{ end }}
{{ end }}

<!-- Piwik/Matomo -->
Expand Down

0 comments on commit 05c9d3d

Please sign in to comment.