Docs menu
Banner & declaration
Configuring the CookieHug banner: consent model, post-consent view, the cookie settings link, custom UI and the cookie declaration.
Banner Customization
Dashboard Configuration
Banner appearance is fully configurable through the CookieHug dashboard: colors (background, text, buttons), position (bottom, top, center modal), texts and descriptions, font settings, and logo.
Consent model (opt-in / opt-out / notice-only)
Domain → Advanced → Consent policy sets how the banner treats a visitor who has not decided yet:
| Model | Behavior before a decision |
|---|---|
| Opt-in (default) | Nothing runs without consent: non-essential scripts stay blocked and all Google Consent Mode signals start as denied. The correct model for the EEA (GDPR). |
| Opt-out | Consent is assumed: signals start as granted and scripts run, but the visitor can refuse at any time. Used where the law permits it (e.g. parts of the US). |
| Notice-only | The banner only informs — there is no choice and only necessary cookies are used. The decision is stored with method: "notice_only" in the consent cookie. |
The model drives the default state of the category toggles, the buttons shown in the banner and the Google Consent Mode defaults. With regional rules (geo-IP) you can keep opt-in in Europe and serve opt-out or notice-only in other regions of the world.
Banner view after consent
Domain → Advanced → Consent policy → banner view after consent controls what a visitor with a saved decision sees when the banner is opened again:
- Summary (default, recommended for GDPR Art. 7(3)) — shows the consent ID, date and category status with two buttons: withdraw consent / change consent. Withdrawing must be as easy as consenting, and this view makes it a single click.
- Editor — reopening goes straight to the category editor (the classic flow).
- None — the banner never reopens on its own; visitors reach it through the floating icon or a
CookieHug.show()call.
Custom Consent UI
Build your own consent interface using submitCustomConsent():
document.getElementById('my-accept-all')
.addEventListener('click', function() {
CookieHug.submitCustomConsent(true, true, true);
});
document.getElementById('my-reject-all')
.addEventListener('click', function() {
CookieHug.submitCustomConsent(false, false, false);
});
document.getElementById('my-save')
.addEventListener('click', function() {
var prefs = document.getElementById('pref-checkbox').checked;
var stats = document.getElementById('stats-checkbox').checked;
var mktg = document.getElementById('mktg-checkbox').checked;
CookieHug.submitCustomConsent(prefs, stats, mktg);
});Cookie Declaration
Embedding the Declaration
To display a cookie declaration table on your website (e.g., on a "Cookie Policy" page), add a <div> with the id cookiehug-declaration:
<div id="cookiehug-declaration"></div>CookieHug will automatically populate this element with a categorized table of all cookies found on your domain. On PrestaShop use the module (its CMS editor rejects script tags) and on WordPress the [cookiehug_declaration] shortcode — see the platform sections above.
Automatic Scanning
CookieHug periodically scans your website and categorizes cookies automatically. You can also trigger a scan manually from the dashboard.
Manual Cookie Management
Through the CookieHug dashboard, you can: add cookies manually, edit cookie descriptions and categories, set expiration information, and assign cookies to categories (necessary, preferences, statistics, marketing).