Add self-hosted goat counter (#826)

* Add self-hosted goat counter

* GoatCounter custom instance and beckward compatibility

---------

Co-authored-by: SilverLuke <luca99.argentieri@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
Luca Argentieri 2023-10-31 08:15:28 +01:00 committed by GitHub
parent e61d6b796b
commit 05c9d3d850
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,6 @@
<!-- Add Analytics if enabled in configuration --> <!-- Add Analytics if enabled in configuration -->
{{ with site.Params.features.analytics }} {{ with site.Params.features.analytics }}
{{ if .enabled }} {{ if or .enable .enabled }}
{{ with .services }} {{ with .services }}
<!-- Google Analytics --> <!-- Google Analytics -->
{{ with .google }} {{ with .google }}
@ -18,12 +18,12 @@
{{ end }} {{ end }}
<!-- GoatCounter --> <!-- GoatCounter -->
{{ with .goatCounter }} {{ with .goatCounter }}
<script {{ with .code }}
data-goatcounter="https://{{ .code }}.goatcounter.com/count" <script data-goatcounter="https://{{ . }}.goatcounter.com/count" async src="//gc.zgo.at/count.js"></script>
async {{ else }}
src="//gc.zgo.at/count.js" <script data-goatcounter="https://{{ .instance }}/count" async src="https://{{ .instance }}/count.js"></script>
></script> {{ end }}
{{ end }} {{ end }}
<!-- Piwik/Matomo --> <!-- Piwik/Matomo -->