For the developer adding these pages

This file contains two documentation pages. Please publish each at the exact URL shown, because the ConsentBit debug panel already links to them:

Page 1 must keep a section with the id late-tags. Every "How to fix" link in the debug panel points to /docs/debug-mode#late-tags, and Google requires that section to start with the Google tag gateway check. Restyle freely to match the site; keep the wording, the anchor and the step order.

Everything below the dotted pages is the content. Remove this grey box when publishing.

consentbit.com/docs/debug-mode

Debug mode

Check that ConsentBit is set up correctly on your website: that Google's consent settings load before your Google tags, and that your tags respect your visitors' choices.

Debug mode shows a small panel on your own screen with a list of checks. It is only visible to you, in the browser tab where you turn it on. Your visitors never see it.

Turn debug mode on

Open any page of your website and add ?consentbit_debug=1 to the end of the address:

https://www.example.com/?consentbit_debug=1

If the address already contains a ?, add it with & instead:

https://www.example.com/pricing?ref=ads&consentbit_debug=1

After a couple of seconds the ConsentBit debug panel appears in the top-right corner. Debug mode stays on while you browse other pages in the same tab.

Other ways to turn it on

If you can edit your site's code, you can instead add data-debug="true" to the ConsentBit script tag. Remember to remove it when you are done, because it turns debug mode on for everyone who opens the page.

<script id="consentbit" data-debug="true" src="https://manager.consentbit.com/consentbit/YOUR-SCRIPT-ID/script.js"></script>

Turn debug mode off

Add ?consentbit_debug=0 to the address, or close the browser tab. Clicking × on the panel hides it for the current page only.

Reading the panel

The top of the panel shows a summary: all checks passed, or the number of issues found. Each line below it has a label:

LabelMeaning
PASSThis part of your setup is correct.
WARNSomething needs your attention. Follow the How to fix link under the message.
INFOUseful information. Nothing to fix.

What each check means

Google's tags need to know your visitors' consent status before they start. ConsentBit sends this starting status (the "consent default") as soon as it loads. By default, advertising and analytics are set to denied until the visitor makes a choice.

MessageWhat to do
PASS Set before any Google tag.Nothing. The values shown (for example ad_storage=denied) are the starting status your Google tags received.
WARN A Google tag ran before ConsentBit loaded, so it started without consent settings.Your Google tag is loading too early. See Fixing a Google tag that loads too early.
WARN Google tag commands were queued above ConsentBit. The default was moved in front of them…ConsentBit corrected the order for you on this visit, but your setup should not depend on that. See Fixing a Google tag that loads too early.
WARN Google tag commands ran before the consent default.See Fixing a Google tag that loads too early.
WARN No consent default found on this page.Check that the ConsentBit script is installed on this page, then see Fixing a Google tag that loads too early.
INFO Set by the ConsentBit GTM template on Consent Initialization.Nothing. You installed ConsentBit through Google Tag Manager, which sets the starting status itself. You can see it in the Consent tab of GTM Preview mode.

Script order

The ConsentBit script must be placed above your Google tag in your page's <head>.

MessageWhat to do
PASS ConsentBit loads before your Google tags.Nothing.
WARN A Google tag is placed above the ConsentBit script.Move the ConsentBit script above it. See Fixing a Google tag that loads too early.

This check does not appear when ConsentBit is installed through Google Tag Manager, because the template controls the order for you.

Google requests

This check looks at the data your Google tags actually sent from the page, and confirms each request carried the visitor's consent status.

MessageWhat to do
PASS 1 request sent with a consent state.Nothing. The code shown, for example gcs=G100, is the consent status Google received. G100 means advertising and analytics were denied; G111 means both were granted.
WARN … sent before the consent default was set.A Google tag sent data before ConsentBit loaded. See Fixing a Google tag that loads too early.
WARN … sent without a consent state.A Google tag sent data without any consent status. See Fixing a Google tag that loads too early.
INFO None sent yet.Nothing. With the ConsentBit IAB TCF banner, Google tags wait until the visitor gives consent before they send anything ("basic mode"). Accept the banner and the check updates.

TCF API (IAB TCF banner only)

If you use the ConsentBit IAB TCF banner, Google's tags read your visitors' choices through the TCF API (__tcfapi). It must be available before Google tags start.

MessageWhat to do
PASS Ready. Google tags are waiting for consent.
PASS Ready before Google tags started.
Nothing. cmpId=502 is ConsentBit's registered IAB CMP ID.
WARN A Google tag started before __tcfapi was available.See Fixing a Google tag that loads too early.
WARN __tcfapi was not found on this page.Check that the IAB TCF banner is enabled for this site in your ConsentBit dashboard, and that the ConsentBit script is installed on this page.

Each time a visitor makes or changes a choice in the banner, ConsentBit sends Google the new status (a "consent update"). Make a choice in the banner and this line shows the latest values, for example analytics_storage=granted. Try Accept and Reject and watch it change.

Google tags

Lists the Google tag IDs found on the page, for example G-XXXXXXXXXX (Google Analytics), AW-… (Google Ads) or GTM-… (Google Tag Manager). If a tag you expect is missing, it may not be installed on this page.

Fixing a Google tag that loads too early

When debug mode flags a Google tag as late, work through these steps in order.

Step 1. Check whether the tag uses Google tag gateway

Google tag gateway serves your Google tags from your own website's address instead of from Google's. It is usually switched on through Cloudflare, another CDN, or Google Cloud.

Signs that your site uses it:

If your site uses Google tag gateway, follow the Google tag gateway guide instead of the steps below. If it does not, continue with Step 2.

Step 2. Put ConsentBit first

The ConsentBit script must be the first script in your page's <head>, above every Google tag.

<head>
  <!-- 1. ConsentBit: first -->
  <script id="consentbit" src="https://manager.consentbit.com/consentbit/YOUR-SCRIPT-ID/script.js"></script>

  <!-- 2. Google tag: after ConsentBit -->
  <script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>
  <script>
    window.dataLayer = window.dataLayer || [];
    function gtag(){dataLayer.push(arguments);}
    gtag('js', new Date());
    gtag('config', 'G-XXXXXXXXXX');
  </script>
</head>

Where to change this, by platform:

Step 3. Do not load ConsentBit with async or defer

The ConsentBit script tag should not have async or defer. Those attributes let the page run your Google tag first. Your Google tag itself can keep async.

Step 4. Check for a second copy of your Google tag

Plugins, themes, website builders and old code snippets sometimes add their own copy of Google Analytics or Google Ads. Look for any other Google tag installation on the page and either remove it or make sure it also loads after ConsentBit.

Step 5. Check again

Publish your changes, then open the page with ?consentbit_debug=1 in a new tab. Every PASS line should now appear. For a second opinion, you can also use Google Tag Assistant: the first consent event should show every consent type as denied until you accept the banner.

Still seeing a warning? Contact ConsentBit support and include the page address and a screenshot of the debug panel.

consentbit.com/docs/google-tag-gateway

Using ConsentBit with Google tag gateway

How to set up ConsentBit when your Google tags are served from your own domain through Google tag gateway.

What Google tag gateway is

Google tag gateway lets your Google tags (Google Analytics, Google Ads, Google Tag Manager) load from your own website's address instead of from googletagmanager.com. It is usually switched on through Cloudflare, another CDN, or Google Cloud.

Google tag gateway changes where your Google tags load from. It does not change what your visitors have agreed to. Your Google tags must still receive the visitor's consent status before they start, exactly as without the gateway.

The one rule

ConsentBit must still load before the Google tag served through the gateway. Nothing else about your ConsentBit setup changes.

Setup

If your Google tag is in your page code

Keep the ConsentBit script first in <head>, then load your Google tag from the gateway path your provider gave you:

<head>
  <!-- 1. ConsentBit: first -->
  <script id="consentbit" src="https://manager.consentbit.com/consentbit/YOUR-SCRIPT-ID/script.js"></script>

  <!-- 2. Google tag through the gateway on your own domain: after ConsentBit -->
  <script async src="https://www.example.com/YOUR-GATEWAY-PATH/gtag/js?id=G-XXXXXXXXXX"></script>
  <script>
    window.dataLayer = window.dataLayer || [];
    function gtag(){dataLayer.push(arguments);}
    gtag('js', new Date());
    gtag('config', 'G-XXXXXXXXXX');
  </script>
</head>

If you turned on the gateway in Cloudflare or another CDN

The CDN serves your existing Google tag through your own domain, so you usually do not change any page code. Check only that the ConsentBit script is still the first script in your <head>, above your Google tag snippet.

If you use Google Tag Manager through the gateway

The template sets the consent status before any other tag in the container runs, wherever the container is loaded from.

If you use the ConsentBit IAB TCF banner

Nothing extra is needed. The TCF banner holds back Google tags until the visitor gives consent, whether they are served through the gateway or not. Keep the ConsentBit script first in <head>.

Check your setup

  1. Open your page with ?consentbit_debug=1 (see Debug mode).
  2. Consent default and Google requests should both show PASS. These checks work the same with or without the gateway.
  3. Open the page in Google Tag Assistant and confirm the first consent event shows every consent type as denied until you accept the banner.
Note: the Script order check recognises Google tags by Google's own addresses. A tag served from your own domain through the gateway may not be listed there. If Consent default and Google requests show PASS, your gateway setup is correct.

Need help? Contact ConsentBit support with your page address and a screenshot of the debug panel.