Cookie banner: consent for analytics and marketing
The Cookie banner is the small window visitors use to accept or refuse analytics and marketing. It appears only while the tracking manager is on, consent is required and the banner is enabled. After a choice it folds into a cookie icon that opens it again. Its settings are the Cookie banner panel of Analytics & Verification.
How it behaves
- Nothing is sent before a button is pressed.
- Pressing the cross or Esc, or making any choice, folds the window into the cookie icon in the same corner.
- A choice is kept in the browser’s localStorage. A plain minimise is kept only for the session.
- Any element with the attribute
data-cookie-openopens the banner again, for example a link in your footer. - The controls are links, not buttons, so a page builder’s button styles cannot change them.
Settings
- Corner: left or right, at the bottom.
- First visit: open window, or only the icon.
- Privacy link: empty uses the WordPress privacy page.
- The default state of the Analytics and Marketing switches.
- Width, padding, distance from the edge, radius and text size in px (each is kept within safe limits).
- Six colours picked with the colour picker. Empty uses the theme’s token, then a neutral value. A chosen text colour also gives the secondary text and the border.
- Texts per language: title, text, the necessary, analytics and marketing labels, reject, save, accept, privacy and the icon label.
Languages
The visitor sees the text for the site language, so Polylang and WPML work. The order is: the default set, then the same language (de for de_AT), then the exact locale. A field you leave empty falls back to the built-in text translated by the plugin.
For developers
The banner script depends on the tracking runtime and sends the normalized choice {analytics, marketing} in the ulp:consent-request event. The tracking manager applies it through ULPTracking.setConsent(), which accepts only boolean values, ignores unknown fields and keeps categories you leave out.
When the cookie icon is shown
You can choose when the cookie icon appears: after the visitor scrolls down a set depth of the page, or only in the sections you pick. Turn on Show only the cookie icon to keep just the icon on screen, without the window.
