Browse Source

Move the noscript img tag to the "footer"

master
parent
commit
473cc87754
  1. 3
      layouts/partials/matomo_cookie_popup.html
  2. 3
      layouts/partials/matomo_head.html

3
layouts/partials/matomo_cookie_popup.html

@ -1,4 +1,7 @@ @@ -1,4 +1,7 @@
{{ if and (isset .Site.Params "matomo") (eq .Site.Params.matomo.enable true) }}
<noscript>
<img referrerpolicy="no-referrer-when-downgrade" src="{{- .Site.Params.matomo.url -}}/matomo.php?idsite={{- .Site.Params.matomo.id -}}&rec=1" style="border:0;" alt="" />
</noscript>
<script type="text/javascript">
window.addEventListener("load", function() {
shouldShowPopup();

3
layouts/partials/matomo_head.html

@ -24,8 +24,5 @@ @@ -24,8 +24,5 @@
})();
</script>
<script src="{{ "assets/hugo-matomo.js" | absURL }}"></script>
{{ if and (isset .Site.Params.matomo "noscript") (eq .Site.Params.matomo.noscript true) }}
<noscript><p><img referrerpolicy="no-referrer-when-downgrade" src="{{- .Site.Params.matomo.url -}}/matomo.php?idsite={{- .Site.Params.matomo.id -}}&rec=1" style="border:0;" alt="" /></p></noscript>
{{ end }}
<!-- End Matomo Code -->
{{ end }}

Loading…
Cancel
Save