1
0
Fork 0
hugo-matomo/layouts/partials/matomo_cookie_popup.html

14 lines
740 B
HTML

{{ 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();
}, false);
</script>
<div class="cookie-banner" style="display:none">
<p>{{ i18n "popupMsg" }}<a href="{{- .Site.Params.matomo.policyurl -}}"> <u>{{ i18n "cookiePolicy" }}</u></a>.</p>
<a style="font-size: 12px;" href="javascript:dismissPopup()">({{ i18n "dismissPopup" }})</a>
</div>
{{ end }}