Blocked element placeholder for preferences and statistics category

Created on 10 February 2025, 13 days ago

Problem/Motivation

We now only check if marketing cookies are allowed. Shouldn't we also support the other categories? So we can have a blocked element message for "preferences", "statistics" and "marketing".

Example of HTML created by Cookiebot when multiple categories are required: data-cookieconsent="statistics,marketing"

Proposed resolution

Beware for not showing 2 messages if for example both statistics and marketing are required.

  • Add a token !cookiebot_required_categories to the default message_placeholder_cookieconsent_optout_marketing.
  • Change [data-cookieconsent="marketing"] to [data-cookieconsent] in the config form item title and description.
  • Change [data-cookieconsent="marketing"] to [data-cookieconsent] in javascript, get the required categories from this and use them to replace the !cookiebot_required_categories token. Use vanilla javascript for this code.
Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇧🇪Belgium matthiasm11

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024