GoatCounter custom instance and beckward compatibility

This commit is contained in:
SilverLuke 2023-10-30 18:12:33 +01:00
parent 761a14d2e9
commit 487e2093e0

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 .enable }} {{ if or .enable .enabled }}
{{ with .services }} {{ with .services }}
<!-- Google Analytics --> <!-- Google Analytics -->
{{ with .google }} {{ with .google }}
@ -19,10 +19,10 @@
<!-- GoatCounter --> <!-- GoatCounter -->
{{ with .goatCounter }} {{ with .goatCounter }}
{{ if .selfHosted }} {{ with .code }}
<script data-goatcounter="https://{{ .url }}/count" async src="https://{{ .url }}/count.js"></script> <script data-goatcounter="https://{{ . }}.goatcounter.com/count" async src="//gc.zgo.at/count.js"></script>
{{ else }} {{ else }}
<script data-goatcounter="https://{{ .code }}.goatcounter.com/count" async src="//gc.zgo.at/count.js"></script> <script data-goatcounter="https://{{ .instance }}/count" async src="https://{{ .instance }}/count.js"></script>
{{ end }} {{ end }}
{{ end }} {{ end }}