When using the consent method 'Implied consent with Cookiebot, your website visitor automatically consents to cookies by scrolling the entry page or by clicking a link on your website. All scripts setting cookies will then be triggered on the entry page, enabling e.g. statistics from the entry page in Google Analytics.
Per default only links created with an <a> tag will trigger an implied consent.
To enable implied consent on any other type of clickable tags, you can simply apply the CSS class "cookieconsent-implied-trigger" to the element, e.g:
<span class="cookieconsent-implied-trigger">Click me</span>
Some websites also enable navigation on other tags by attaching an onclick event handler. To enable implied consent on these types of elements as well, attach the following event handler to your clickable elements, in this example all elements holding the class 'menutile', using JQuery:
$(document).on("click", ".menutile", function(){
if (!'Cookiebot' in window || !'CookiebotDialog' in window) return;
if (!Cookiebot.hasResponse && CookiebotDialog.consentLevel=='implied') {
CookiebotDialog.submitConsent(true, document.location.href);
}
});
Comments
0 comments
Please sign in to leave a comment.