Remove remnants of hugo_cookie_consent.

This commit is contained in:
2026-06-16 17:14:18 +02:00
parent b784459d87
commit 3ac7f0fb8e
16 changed files with 15 additions and 166 deletions
+1 -31
View File
@@ -1,6 +1,3 @@
{{- $js := resources.Get "js/cookie-consent.js" | minify -}}
<script src="{{ $js.RelPermalink }}" defer></script>
<!-- Bootstrap Bundle JS (includes Popper.js) -->
{{ $bs := resources.Get "js/bootstrap.bundle.min.js" | fingerprint "sha512" }}
{{ if $bs }}
@@ -14,31 +11,4 @@
<script src="{{ $custom.RelPermalink }}" integrity="{{ $custom.Data.Integrity }}" crossorigin="anonymous"></script>
{{ end }}
{{ if eq hugo.Environment "production" }}
<!-- Matomo -->
<script>
// Path 1: user just clicked Accept (event fires this session)
window.addEventListener('cookieAccepted', loadMatomo);
// Path 2: user already consented in a previous visit
if (localStorage.getItem('cookie_consent') === 'accepted') {
loadMatomo();
}
function loadMatomo() {
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="https://matomo.bovender.de/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '9']);
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 Matomo Code -->
{{ end }}
{{ partial "scripts_extra.html "}}