BLACKGO kód: sütibanner egy évig ingyen. Fiók létrehozása →

Marking code by hand

Manual marking takes precedence over automatic detection.

<script type="text/plain" data-consent-cat="marketing" data-consent-src="/js/tracker.js"></script>
<iframe data-consent-cat="functional" src="https://..."></iframe>
<script data-consent-ignore>/* the module never touches this script */</script>
  • data-consent-open – the element opens the cookie settings.
  • data-consent-withdraw – the element withdraws consent.
  • data-consent-id – the element is filled with the visitor’s consent ID (for example <span data-consent-id></span> in the cookie policy).

JavaScript API

Consent.get();                    // current state or null
Consent.granted('analytics');     // true / false
Consent.open(); Consent.close();
Consent.acceptAll(); Consent.rejectAll(); Consent.withdraw();
Consent.set({ analytics: true, marketing: false });
Consent.onChange(function (cats, action) { /* ... */ });
Consent.version;                  // banner content version
window.addEventListener('consent:change', function (e) { /* ... */ });

Consent from forms

Store consent from a form (for example a newsletter sign-up) in the log as the action “form”:

Consent.logFormConsent({ email: 'name@example.com', form: 'newsletter' });

Marketing consents in forms still need their own checkboxes.

What the module does not do

  • It does not write the privacy policy – it generates the cookie table.
  • It does not support IAB TCF. Sites selling ad space in RTB need a certified TCF platform.
  • It does not decide for you what is necessary. Default categories are cautious, but the site owner is responsible for the assignment.
  • It does not block inline code that matches no known service automatically. Add it in the “Custom scripts” section (Services and scripts tab) or mark it by hand.

Próbálja ki a consetgo modult a saját oldalán

14 nap ingyen. A telepítés néhány percig tart.

Próbálja ki 14 napig ingyen