Skip to main content

Verify the blocking

This page explains how to check from the browser that marked scripts and iframes stay on hold without consent and run after the visitor's choice.

v2 banner

The v2 banner uses a different marking. See Manual marking (v2). If you do not know which banner your site uses, read Which banner your site is using.

Prerequisites​

Before you start, you need:

  • a private window, so the banner does not find a consent already saved;
  • the browser developer tools (in Chrome, F12).

Steps​

1. Check the page source​

  1. Open the page and choose View page source from the browser menu.
  2. Look for the marked elements. Scripts have type="text/avacy-blocked" and data-avacy-requires. Iframes have data-avacy-src and no src.

The source shows the HTML sent by the server, before the banner changes anything. A script that still has src or an executable type runs immediately.

  1. Open the developer tools and go to the Network panel.
  2. Turn on Preserve log. Reload the page without choosing anything in the banner.
  3. Look in the list for the address of the marked script or iframe. For a Google tag, look for googletagmanager.com.

The list has no requests to that address.

3. Check the Network panel after the choice​

  1. Choose Accept cookies in the banner (default English text).
  2. Look for the address again. The request appears, because the banner has unblocked the element.
  3. In the Elements panel, the unblocked iframe has its src, and the unblocked script is a new node without the data-avacy-* attributes.

Repeat the test in a new private window with Reject all. Elements with an actual requirement stay blocked.

4. Check the order in the dataLayer​

For Google tags, the order of commands in the dataLayer matters. After Accept cookies, paste this code into the console.

dataLayer.map((e, i) => i + ' ' + (e.event ? 'event ' + e.event : Array.from(e).slice(0, 2).join(' ').slice(0, 60)))

With the marked GA4 tag from Google tags with gtag, on a web space with Consent Mode on, the result is this.

0 set developer_id.dYWUyYT
1 consent default
2 consent update
3 event avacy_consent_update
4 js Tue Nov 10 2026 …
5 config G-XXXXXXXXXX
6 event gtm.dom
7 event gtm.load

consent update and the avacy_consent_update event come before the Google tag's js and config commands, so the tag reads the consent already updated.

set developer_id is the identifier the banner uses to present itself to Google. consent default is the initial value, with all consent types set to denied. The gtm.dom and gtm.load events are added by gtag.js.

5. Check the banner logs​

If something does not run, turn on the banner's debug mode: see Google tag order and debug mode.

6. Check with Tag Assistant​

For Google tags, also use Tag Assistant, as described in Google's page on Consent Mode debugging. In the list on the left (Summary), click the Consent Default event. In the API Call section, check that ad_storage, ad_personalization, ad_user_data and analytics_storage are set. In the Consent tab, check the On-page Default and On-page Update columns.

Common problems​

The request appears before the choice: check that the script has type="text/avacy-blocked" and no longer has src. Look for a second copy of the same script, for example in a theme, a plugin or a tag manager.

The request does not appear after Accept cookies: check the add-on prerequisite and the data-avacy-requires syntax, described in Mark scripts and iframes.

The dataLayer shows the Google tag before the consent update: the banner snippet must be in the <head>, before the Google tag. See Google tag order and debug mode.

The window is not clean: a consent already saved makes the scripts run on every load. Use a new private window for each test.


Last updated: 27/10/2026.