Iubenda logo
Start generating

Documentation

Table of Contents

How to display a notice in place of pre-blocked scripts

… and better optimize the consent rate

Do you use third-party services on your website that can install cookies on users’ browsers?

Make sure you are blocking your third-party cookies before users grant their consent.

We have created a feature that allows you to display a custom message instead of the pre-blocked scripts and iframes. This could help you to convert users’ rejection into actual consent.

Let’s see how it works! 👇

Jump straight to → How to set up this feature?

How does this work?

When an iframe is blocked, customizable content will be displayed to the user, giving the opportunity to opt-in if some content is blocked and ultimately unlocking the blocked content from the iframe.

This customizable notice replaces content that cannot be displayed because consent has not yet been granted or because consent has been rejected for that purpose and is therefore blocked by the Cookie Solution.

If for example, some content on your website has scripts/iframes from third-party content providers (e.g., YouTube, Google Maps, Livestorm, etc.) these may use cookies (or similar technologies) and therefore require the user’s consent.

To ensure that cookies are not set before the website visitor has consented to their use, the loading of the script/iframe must be blocked until the visitor has consented.

When consent is given, the Cookie Solution will then enable the scripts.

Otherwise, if a user rejects the use of cookies inside the blocked iframe a warning is displayed with an update button to review their preferences.

👉 With this feature you give your users the option to change or review their consent preferences and display the blocked content once their preferences are changed.
Let’s see! →

Through a dialogue box that pops up instead of pre-blocked scripts and iframes, like this one:

And once the user clicks on the “Update” button the Cookie Solution pre-selects the purpose that needs to be accepted and, once their preferences are changed, displays the blocked content. Allowing them to review and change their consent preferences.

On subsequent page requests where the visitor has already submitted consent, the content of the iframe will automatically load according to the user’s consent status.

This placeholder will only be displayed if the visitor hasn’t consented, and will automatically be hidden if the user chooses to update their consent settings to include cookies in the required category.

How to set up this feature?

In order to enable this feature with the Cookie Solution you just need to set promptToAcceptOnBlockedElements to true

  • It’s preferable that you add "about:blank" as src to the blocked iframe
  • And you can customize the text via the i18n Javascript library. Here is the list of the components:
    • blocked_overlay.title: The title of the warning.
      Default: Content is blocked
    • blocked_overlay.paragraph: The copy of the warning.
      Default: You denied the use of cookies or similar technologies for %{purposes}. To view this content, please update your consent preferences
      • Shortcodes: %{purposes} – automatically fills with the relevant purpose
    • blocked_overlay.accept_button: The caption of the button.
      Default: Update

Here is an example of how you can use this feature:

💡 Remember

In accordance with the general principles of privacy law, which do not permit the processing of data prior to consent, the cookie law does not allow the installation of cookies before obtaining the user’s consent, except for exempt categories.

This means that, in addition to displaying a cookie banner, cookies must also be blocked prior to consent. And manual tagging is one of the options available to do this. Read more about here.

Under the GDPR record-keeping regulations are necessary. Ensure that your Cookie Preference Log is enabled under the Cookie Solution.

Many Data Protection Authorities throughout the EU have tightened their regulations and linked their rules on cookies and trackers with the GDPR obligations.

Our Cookie Solution now includes Cookie Preference Logs.
You can quickly save and manage GDPR proofs of your users’ consent preferences by adding this feature with a single click.