Most banner customization should happen in the CookieChimp dashboard. You can create multiple banners targeting different geolocation rules — country, US state, or other region — each with its own categories, translations, and consent mode (opt-in or opt-out). If you need a different legal text in California, a separate banner for visitors from Germany, or a translated version for visitors from Japan, that’s all configured without writing code. This page covers the cases that go beyond dashboard configuration: programmatic overrides where you reach intoDocumentation Index
Fetch the complete documentation index at: https://docs.cookiechimp.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
window.CookieChimp (or its CSS variables) from your own JavaScript or CSS to tweak the banner that’s already been served. Common reasons to do this include:
- Hiding or showing a UI element on the banner for visitors from one country only.
- Tagging your own analytics or CRM events with the consent mode that was applied, for internal reporting.
- Giving the banner different branding on each of your domains while sharing a single CookieChimp account.
window.CookieChimp or the current page.
What properties are available?
Example: hide the close button for one country
Some jurisdictions treat a close (×) button as an ambiguous signal — a visitor who dismisses the banner without an explicit accept or reject hasn’t made a clear consent choice, and regulators may not consider that a valid interaction. If your default banner shows a close button, the cleanest fix is to hide it — but only for visitors from those countries, so the easier dismissal flow is preserved elsewhere.
You can keep a single banner and toggle the close button visibility with a small CSS rule that’s only applied when visitorCountry matches.
Option 1 — Inject a style tag
Option 2 — Toggle a class on <html> and scope the CSS
Example: tag your own analytics with the visitor’s consent mode
CookieChimp already handles tag-firing correctly for both opt-in and opt-out banners out of the box — opt-out banners fire analytics natively without waiting for consent, and Google Consent Mode is wired up automatically. You don’t need to write code for that. What you may want to do is segment your own product analytics by consent mode so you can build internal dashboards — for example, comparing engagement between visitors who saw an opt-in banner vs. an opt-out banner, or tracking consent rates by country for compliance reporting.window.analytics.identify for whichever analytics or CDP SDK you use (Segment, Amplitude, Mixpanel, PostHog, etc.). Once these properties are attached to the visitor, every downstream event can be filtered or grouped by consent mode and region.
Example: per-domain branding when sharing one account
If you run multiple domains from a single CookieChimp account — for example, a brand and its regional subsidiaries — you can keep one set of categories, vendor lists, and consent records, while still giving each domain its own banner colours. The dashboard sets the global theme; a tiny CSS override on each domain swaps the variables that need to differ. Add the override directly in each site’s stylesheet (or inject it from your tag manager):location.hostname:
When should I override vs. configure another banner?
Configure a separate banner in the dashboard (via geolocation rules) when:- You want different banner text, design, or configuration for a region — each banner has its own copy, styling, and consent mode (opt-in or opt-out), with translations built in.
- The applied consent mode needs to differ between regions — CookieChimp surfaces the applied mode via
getConfig().mode.
- The banner content is the same across regions, but you need a small UI tweak, a per-domain colour change, or different tag-firing behaviour for one segment.
- You want to keep a single source of truth for banner content and avoid maintaining duplicates just to flip one CSS rule or push one event.
- Enable Debug mode from the CookieChimp dashboard and check the browser JS console for errors.
If you encounter any issues or need further assistance, please reach out to us via our chat.