123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- <!-- Add Analytics if enabled in configuration -->
- {{ with site.Params.features.analytics }}
- {{ if or .enable .enabled }}
- {{ with .services }}
- <!-- Google Analytics -->
- {{ with .google }}
- {{ partial "google_analytics.html" . }}
- {{ end }}
- <!-- Counter.dev -->
- {{ with .counterDev }}
- <script src="https://cdn.counter.dev/script.js"
- data-id="{{ .id }}"
- data-utcoffset="1"
- ></script>
- {{ end }}
- <!-- GoatCounter -->
- {{ 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 -->
- {{ with .matomo }}
- <!-- Matomo -->
- <script>
- var _paq = window._paq = window._paq || [];
- /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
- _paq.push(['trackPageView']);
- _paq.push(['enableLinkTracking']);
- (function() {
- var u="//{{ .instance }}/";
- _paq.push(['setTrackerUrl', u+'matomo.php']);
- _paq.push(['setSiteId', '{{ .siteId }}']);
- var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
- g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
- })();
- </script>
- {{ end }}
- {{ with .cloudflare }}
- <!-- Cloudflare Web Analytics -->
- <script defer src='https://static.cloudflareinsights.com/beacon.min.js'
- data-cf-beacon='{"token": "{{ .token }}"}'
- ></script>
- <!-- End Cloudflare Web Analytics -->
- {{ end }}
- {{ with .umami }}
- <!-- Umami analytics -->
- <script defer src='{{ or .scheme "https" }}://{{ or .instance "analytics.eu.umami.is" }}/script.js' data-website-id="{{ .id }}"></script>
- <!-- End Umami analytics -->
- {{end}}
- {{ with .statcounter }}
- <!-- Statcounter analytics -->
- <script type="text/javascript" src="https://www.statcounter.com/counter/counter.js" async></script>
- <script type="text/javascript">
- var sc_project = {{ .project }};
- var sc_invisible = {{ .invisible }};
- var sc_security = "{{ .security }}";
- var scJsHost = (("https:" == document.location.protocol) ?
- "https://www.statcounter.com/js/" : "https://www.statcounter.com/js/");
- </script>
- <noscript>
- <div class="statcounter"><a title="web counter" href="https://statcounter.com/" target="_blank"><img
- class="statcounter" src="https://c.statcounter.com/{{ .project }}/0/{{ .security }}/{{ .invisible }}/"
- alt="web counter" referrerPolicy="no-referrer-when-downgrade"></a></div>
- <!-- End of Statcounter Code -->
- </noscript>
- <!-- End Statcounter analytics -->
- {{ end }}
- {{ end }}
- {{ end }}
- {{ end }}
- <!-- Keep backwards compatibility and consistency with HUGO defaults -->
- {{ if .Site.Config.Services.GoogleAnalytics.ID }}
- {{ partial "google_analytics.html" . }}
- {{ end }}
|