Cookie Consent

Cookie consent bar with a privacy preferences modal and per-service consent toggles. It is shown in the block inserter as Canvas Cookie Consent and registered as canvas-core/gdpr-consent.

Select the block on a page and its own settings open in the sidebar, in the panels below:

The Cookie Consent settings in the block editor sidebar

Settings

Each setting is named exactly as the block editor names it, followed by what it does and what it starts as. Where a setting carries a Shown when line, it stays hidden until that condition is met, which is the usual reason a setting looks missing from the sidebar:

Bar

  • Show Cookie BarDefaultOn

    Turn off to render only the privacy preferences modal, for a page whose consent prompts live inside the content and link to #gdpr-preferences.

  • Cookie Bar MessageDefaultWe use cookies from third party services for marketing activities and to offer you a better experience. Read about how we use cookies and how you can control them by clicking "Privacy Preferences".

    Shown in the bar. Basic HTML is allowed.

    Shown when Show Cookie Bar is on

  • Message ClassesDefaultlead mb-0

    Classes on the message paragraph.

    Shown when Show Cookie Bar is on

  • Bar LayoutDefaultFull Width (Bottom)

    Whether the bar spans the foot of the screen or sits as a small panel in one bottom corner.

    ChoicesFull Width (Bottom)Small (Bottom Left)Small (Bottom Right)Shown when Show Cookie Bar is on

  • Bar StyleDefaultDark

    Whether the bar is drawn dark or light.

    ChoicesDarkLightShown when Show Cookie Bar is on

  • Extra Bar ClassesDefaultEmpty

    Extra classes on the bar.

    Shown when Show Cookie Bar is on

  • Bar Inline CSSDefaultEmpty

    Inline style on the bar, which is where its width and its spacing are set.

    Shown when Show Cookie Bar is on

  • PersistentDefaultOff

    Keep the bar on screen until the visitor makes a choice.

    Shown when Show Cookie Bar is on

Buttons

  • Buttons LayoutDefaultAccept + Preferences link

    Which buttons the bar offers.

    ChoicesAccept + Preferences linkAccept All / Preferences / DeclineShown when Show Cookie Bar is on

  • Accept Button TextDefaultAccept & Close

    Wording on the accept button.

    Shown when Show Cookie Bar is on and Buttons Layout is "Accept + Preferences link"

  • Accept All Button TextDefaultAccept All

    Wording on the accept all button.

    Shown when Show Cookie Bar is on and Buttons Layout is "Accept All / Preferences / Decline"

  • Decline Button TextDefaultDecline

    Wording on the decline button in the bar.

    Shown when Show Cookie Bar is on and Buttons Layout is "Accept All / Preferences / Decline"

  • Preferences Link TextDefaultPrivacy Preferences

    Wording on the link that opens the preferences window.

    Shown when Show Cookie Bar is on

Preferences Modal

  • Modal TitleDefaultPrivacy Preferences

    Heading of the preferences window.

  • Modal Title LevelDefaultH3

    Heading level for the preferences window title.

    ChoicesH2H3H4H5

  • Modal DescriptionDefaultWhen you visit any website, it may store or retrieve information through your browser, usually in the form of cookies. Since we respect your right to privacy, you can choose not to permit data collection from certain types of services. However, not allowing these services may impact your experience.

    Paragraph explaining the choices, shown under the preferences window heading.

  • Save Button TextDefaultSave & Accept

    Wording on the button that saves the chosen preferences.

  • Modal Decline Link TextDefaultDecline Cookies

    Wording on the decline link inside the preferences window.

  • Cookie CategoriesDefaultEmpty

    The groups of cookies a visitor can turn on and off, one row each.

    Each row of Cookie Categories takes:

    • NameDefaultEmpty

      Inline markup is allowed, e.g. a qualifier after the service name.

    • Cookie SlugDefaultEmpty

      Machine name stored in the consent cookie, e.g. "youtube".

    • DescriptionDefaultEmpty

      Explains what this group of cookies is used for, shown under its name.

    • Always Active (no toggle)DefaultOff

      Mark this group as always on, so it is listed without a switch. Use it for cookies the site cannot work without.

    • Enabled by defaultDefaultOff

      Start this group switched on when a visitor first sees the window.

Behaviour

  • Show Delay (ms)Default1500

    How long to wait after the page loads before the bar appears, in milliseconds.

    Shown when Show Cookie Bar is on

  • Cookie Expiry (days)Default30

    How many days a visitor choice is remembered before they are asked again.

  • Animation Speed (ms)Default300

    How long the bar takes to slide into view, in milliseconds.

    Shown when Show Cookie Bar is on

Every Canvas block also carries the Animation, Scroll Effects and Advanced panels, which are described in Controls every Canvas block has.

Other blocks in Interactive: Accordions, AJAX Buttons, Carousels, Countdowns, Flip Cards, Galleries.

Was this page helpful?