Close this search box.


In this article


Recent articles

Placeholders for iFrames

From 6.0 onward you will be able to add your placeholder in the script center directly.

You’re able to block iFrames with Complianz with the built-in script center. (under Integrations). But preventing an iFrame from loading third-party cookies won’t strip the HTML from your website, and you’re left with a content block on your page, without content prior to consent.

To signify the iFrame is blocked before consent and the content block is usually reserved for loaded content, you can add a placeholder with an accept cookies button.

Refresher: Blocking iFrames

Under Complianz > Integrations > Script Center, you will find the last editor reserved for iFrames. Here you can add the URL, or multiple URL’s comma-separated to block your iFrames. Sometimes an iFrame adds a script as well. This script can be blocked with the second editor, reserved for scripts.

script center iframe


 div class="calendly-inline-widget placeholder-inactive" style="min-width: 320px; height: 730px;" data-url="">/div
script type="text/javascript" src="">/script

Script Center

Blocking script URL:
Blocking iFrame URL:

Adding the Placeholder

In the above example, I added a class name called “placeholder inactive”. This is done to add custom CSS to the iFrame.

To add the placeholder, you can add the following HTML below the iFrame:

div class="cmplz-blocked-content-container cmplz-blocked-content-notice cmplz-accept-{category} cmplz-accept-{service} placeholder-active" style="text-align: center; cursor: pointer;">Click here to accept marketing cookies before loading this iFrame./div

You can, of course, use your own wording. In this div, a class called “placeholder-active” is added.

For {category} add for example marketing. And for {service} you could add reCAPTCHA or other services.

At this moment, please check if your iFrame is blocked before consent. Also, check if the placeholder sentence is displayed before and removed after consent.

Customized for Styling

To fill in the gap of your iFrame and add some styling to the button, please remember the beforementioned classes added to the divs.

If you need help, or something is unclear, we’re happy to help!

For the iFrame “placeholder-inactive” and for the placeholder “placeholder-active”:

.placeholder-active {
    background: #f2f2f2;
    vertical-align: middle;
    align-content: center;
    margin-top: -475px;
.placeholder-inactive {
border: 1px solid #dedede;

Join 900.000 users and install The Privacy Suite for WordPress locally, automated or fully customized, and access our awesome support if you need any help!

Complianz has received its Google CMP Certification to conform to requirements for publishers using Google advertising products.