Demo

What a blocked embed looks like

Most consent plugins deal with a third-party embed by deleting it. The visitor gets a blank space, no explanation, and no way to ask for the content back. Here is what CookiePile does instead, on a real embed rather than a mock-up.

A real Google Maps embed

The block below is an ordinary <iframe> pointing at Google Maps. Nothing on this page was written specially for it and no shortcode was used – CookiePile recognises the address on its own.

If you have not allowed Marketing cookies on this site, you are not looking at a map. You are looking at CookiePile’s placeholder, and your browser has not requested anything from Google Maps.

The Berlaymont in Brussels, which seemed a reasonable place to point a map on a page about consent law.

Press Load content and three things happen at once:

  • consent for the Marketing category is recorded, exactly as if you had chosen it in the banner
  • the map loads where the placeholder was, with no page reload
  • every other embed and script held back under the same category comes back at the same moment

The middle one is what is usually missing. A plugin that hides an embed until consent normally needs a reload to bring it back, because the embed was taken out of the page rather than paused. CookiePile keeps the frame where it is with its address parked on a data attribute, puts the address back the moment the choice is made, and fires a cookiepile:unblocked event so anything else on the page can start itself at the same time.

The same box appears for YouTube, Vimeo, Spotify, SoundCloud, Instagram, Facebook and Calendly embeds, each named in its own placeholder.

Embeds drawn by a script

An iframe is the easy case: it carries an address, so it can be recognised and paused. The hard case is an embed a script draws for itself – a map widget, a booking calendar, a chat window. Block the script and all that is left is the empty container your theme printed, usually still holding its full height. A silent hole with nothing to click.

CookiePile covers those too. Advanced Custom Fields map containers are recognised on their own, and any other container can be pointed out by adding data-cookiepile-embed="google-maps" to it. The placeholder is drawn inside that container, with the same button and the same behaviour.

Start over

Loaded the map and want the blocked state back? This clears the consent choice stored for this site and reloads the page. It changes nothing else.

CookiePile

Try it on your own site

CookiePile is free on WordPress.org, with no time limit. Consent Mode v2, Google Tag Manager, WP Consent API and Microsoft UET and Clarity signals, automatic blocking of around forty known services, and a Tracking Diagnostics screen that checks your tags really respect the visitor choice.