Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7187f7bb2a | |||
| ac0e1ed8c6 | |||
| 5597e11a69 |
@@ -1,6 +1,6 @@
|
|||||||
(function () {
|
(function () {
|
||||||
function trackVisit() {
|
function trackVisit() {
|
||||||
var banner = document.getElementById('cookie_banner');
|
var banner = document.getElementById('cookie-banner');
|
||||||
if (!banner) return;
|
if (!banner) return;
|
||||||
var matomoUrl = banner.dataset.matomoUrl;
|
var matomoUrl = banner.dataset.matomoUrl;
|
||||||
var siteId = banner.dataset.matomoSiteId;
|
var siteId = banner.dataset.matomoSiteId;
|
||||||
@@ -23,4 +23,4 @@
|
|||||||
if (localStorage.getItem('cookie_consent') === 'accepted') {
|
if (localStorage.getItem('cookie_consent') === 'accepted') {
|
||||||
trackVisit();
|
trackVisit();
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|||||||
@@ -3,4 +3,5 @@
|
|||||||
{{- if eq .Site.Params.hugo_cookie_consent.enable_tracking true -}}
|
{{- if eq .Site.Params.hugo_cookie_consent.enable_tracking true -}}
|
||||||
{{- $js := resources.Get "js/hugo_cookie_consent/tracker_code.js" | minify -}}
|
{{- $js := resources.Get "js/hugo_cookie_consent/tracker_code.js" | minify -}}
|
||||||
<script src="{{ $js.RelPermalink }}" defer></script>
|
<script src="{{ $js.RelPermalink }}" defer></script>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<p>
|
<p>
|
||||||
{{ i18n "cookie_status" }}:
|
{{ i18n "cookie_status" }}:
|
||||||
<strong id="cookie_status"
|
<strong id="cookie-status"
|
||||||
data-accepted="{{ i18n "cookie_accepted" }}"
|
data-accepted="{{ i18n "cookie_accepted" }}"
|
||||||
data-declined="{{ i18n "cookie_declined" }}"
|
data-declined="{{ i18n "cookie_declined" }}"
|
||||||
data-none="{{ i18n "cookie_none" }}">
|
data-none="{{ i18n "cookie_none" }}">
|
||||||
|
|||||||
Reference in New Issue
Block a user