PremiumNewFeaturedCompliance & Legal

Cookie Consent Banner

GDPR/CCPA-compliant consent with category opt-ins. Replaces Cookieyes.

#cookies#consent#gdpr#ccpa#privacy#cookieyes-replacement#iubenda-replacement

Live preview

See it in action.

Fully interactive, drag, click, scroll inside the frame, toggle to mobile.

About this section

A polished cookie consent banner with three categories (Necessary, Analytics, Marketing, plus optional Functional). Bar slides in from the bottom on first visit; Customize opens a modal with toggle switches per category. Saves consent in localStorage and dispatches a modblo-consent:updated event with the granular state so your analytics / marketing tags can self-gate. Re-prompts after a configurable number of days. Public window.cbConsent API for footer 'Cookie preferences' links.

Install in 90 seconds

  1. 01

    Create /sections/modblo-cookie-consent.liquid.

  2. 02

    Paste the section code and save.

  3. 03

    Add `{% section 'modblo-cookie-consent' %}` to theme.liquid (just before </body>) so it runs on every page.

  4. 04

    Wrap your analytics / marketing tags so they only fire when consent is granted. Example: document.addEventListener('modblo-consent:updated', e => { if (e.detail.analytics) loadGoogleAnalytics(); }).

  5. 05

    (Optional) Add a 'Cookie preferences' link in your footer with data-modblo-cc-trigger so visitors can re-open the modal anytime.

The Liquid

Unlock the section code

Cookie Consent Banner is a premium section. Get the full Liquid + scoped CSS paste-ready.

One-time purchase · Lifetime updates · You own the code

Theme editor settings

SettingTypeDefault

Bar heading

bar_heading

textWe use cookies

Bar message

bar_message

textarea,

Privacy policy link

policy_url

url,

Accept label

accept_label

textAccept all

Reject label

reject_label

textReject all

Customize label

customize_label

textCustomize

Modal heading

modal_heading

textCookie preferences

Modal subtext

modal_sub

textarea,

Show 'Functional' category

show_functional

checkboxfalse

Re-prompt after N days

revisit_days

range180

Background

bg

color#ffffff

Foreground

fg

color#0b0b0c

Accent

accent

color#6366f1

SEO & accessibility notes

  • Real <button> and <input type="checkbox"> with proper labels, keyboard accessible.
  • Aria-modal labeled, focus-trappable in dialog.
  • Stores consent in localStorage only, no first-party cookie required by the consent banner itself.
  • Re-prompt frequency configurable to match GDPR refresh recommendations (typically 6-12 months).
  • Public window.cbConsent.get() API lets you read consent state from any script.
Cookie Consent Banner. Shopify section | modblo