Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Consent banner shown but tags fire before any choice: fix it

TRK-282High impactDetectedBy FunnelGuardPublished Updated
On this page

What this issue is

A consent banner asks visitors whether tracking is allowed. This issue means the banner appears, but your tags ignore it. Page views, ad pixels and conversion tags fire as soon as the page loads, before the visitor clicks Accept or Reject.

It usually happens because the tags are hard-coded in the page, or a tag manager trigger fires on All Pages with no consent condition. The banner script and the tags run independently, so the banner is only decoration.

Why it costs you leads or sales

Firing tags before consent can break privacy rules for visitors in the EU and UK, and in some US states. That risks complaints, and ad platforms can limit or reject data they see as collected without consent. It is a compliance risk, not legal advice, so check your own obligations.

It also hurts your numbers. If you later fix it in a rushed way, you can block tags entirely and lose conversion data. Audiences and reports built on data collected without a valid choice are also hard to trust.

What happens on a page that fires tags too early
  1. Page loadsBanner script and tags start together
  2. Tags fireGA4, Ads and Meta send hits with no consent
  3. Banner shownVisitor sees the choice too late
  4. Visitor choosesChoice cannot undo the hits already sent

The tags run before the visitor can decide, so the choice has no effect.

How to check if your site has it

Test it in a clean browser session
  1. Open a private window

    Use an incognito or private window so no earlier consent choice is stored. Ideally browse from an EU or UK location or use a VPN if your banner is region-based.

  2. Open DevTools before loading

    Press F12, go to the Network tab, tick Preserve log, and filter for collect, googleads, doubleclick, facebook.com/tr and similar.

  3. Load the page and do not touch the banner

    If requests to GA4 (g/collect), Google Ads, or Meta (facebook.com/tr) appear while the banner is still showing, tags fire before choice.

  4. Check cookies

    In the Application tab, look under Cookies. Cookies such as _ga or _fbp present before any click are a further sign.

  5. Check Tag Manager previewGoogle Tag Manager

    In Google Tag Manager, open Preview and see which tags fired on the Consent Initialization and Initialization or Page View events, before you clicked.

How to fix it

The principle is the same everywhere: set the default consent state to denied before any tag runs, then let the banner update it when the visitor chooses. The details depend on your platform and consent tool (CMP).

Default denied consent, placed above all tagshtml
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('consent', 'default', {
    'ad_storage': 'denied',
    'ad_user_data': 'denied',
    'ad_personalization': 'denied',
    'analytics_storage': 'denied',
    'wait_for_update': 500
  });
</script>
Make tags wait for consent
  1. Enable consent overview

    In your container go to Admin > Container Settings and tick Enable consent overview.

  2. Set the default in a CMP template

    Use your CMP's Tag Manager template on the Consent Initialization - All Pages trigger so the denied default is set before other tags.

  3. Set required consent on tags

    Open each tag, go to Advanced Settings > Consent Settings, and require ad_storage for ad tags and analytics_storage for analytics tags. For tags with no built-in checks, such as Meta, add the required consent manually.

  4. Remove hard-coded copies

    Delete any tag snippets pasted directly into the site theme, or they will still fire without consent.

Tag behaviour on first page load

Before

  • Banner visible
  • GA4 and ad hits sent immediately
  • _ga and _fbp cookies set before any click

After

  • Banner visible
  • No ad or analytics hits until a choice is made
  • Tags fire after Accept, using the saved choice

How to confirm it's fixed

Confirmation checks
  • In a fresh private window, no GA4, Ads or Meta requests appear before you click the banner.
  • No _ga, _gcl or _fbp cookies exist before a choice.
  • After you click Accept, the expected tags fire once.
  • After you click Reject, ad and analytics tags stay silent.
  • Tag Manager Preview shows consent state as denied on first load, then updated after the choice.
  • Hard-coded copies of tags are gone from the page source.
Tags waiting for a consent choice

With a denied default, tags are held back until the visitor chooses.

How to prevent it happening again

Habits that keep tags honest
  • Keep all tags in one place, ideally your tag manager, and avoid pasting pixels into themes.
  • Re-test in a clean session after adding any new pixel, plugin or app.
  • Re-test after changing your consent tool, theme or tag manager container.
  • Require consent settings on every new tag before you publish.
  • Test from both an EU and a US location if your banner rules differ by region.

How FunnelGuard handles this

FunnelGuard detects this issue today. It runs a consent-denied variant of your journey: a robot visitor loads your page without accepting anything and watches which tracking hits go out to platforms such as GA4, Google Ads, Meta, TikTok and LinkedIn. If ad or analytics hits are sent while consent is denied or not yet given, the check fails.

A failure is re-checked from a second region before one alert goes out, with a screenshot and a likely cause. The robot never bypasses CAPTCHAs or bot protection, and its test traffic is marked with utm_source=funnelguard, fg_test=1, an fg_test cookie and its own user agent. The Free plan covers 1 site and 2 journeys with daily checks and no card, and paid plans have a 3-day free trial.

Questions people ask

Why are my tags firing before the visitor accepts cookies?

Usually the tags are hard-coded in the theme or fire on an All Pages trigger with no consent condition. The banner script runs separately and does not stop them. Set a denied default consent state first and require consent on each tag.

How do I stop Google Analytics from loading until cookie consent is given?

Set a default consent state of denied for analytics_storage before the Google tag loads, then update it to granted when the visitor accepts. In Google Tag Manager, also add analytics_storage as required consent on the GA4 tags. Remove any copy of the tag hard-coded in your site.

How can I check whether my cookie banner actually blocks tags?

Open a private window, open DevTools Network tab, load your page and do not click the banner. If requests to GA4, Google Ads or Meta appear, or cookies like _ga and _fbp are set, your tags are firing before choice.

Does a cookie banner alone make my site compliant?

No. A banner only works if tags respect the choice. If tracking runs before the visitor decides, the banner does not control anything. Check your legal obligations with a qualified adviser for your regions.

How do I make the Meta pixel wait for cookie consent?

Load it only after consent, either through your consent tool's script manager or a Tag Manager tag with required consent. In custom code you can call fbq('consent','revoke') before init and fbq('consent','grant') after the visitor accepts.

Will blocking tags before consent lose me conversion data?

You will not record visitors who decline, which is the intended effect. Using Consent Mode for Google tags can allow limited modelled measurement depending on your setup. Check how your tools handle it.

Can FunnelGuard tell me if tags fire before consent?

Yes. FunnelGuard runs a consent-denied variant of your journey and checks whether tracking hits go to ad and analytics platforms when no consent has been given. If they do, you get one alert with a screenshot and a likely cause.

Does FunnelGuard catch this?

Detected

FunnelGuard checks for this today.

How: consent-denied variant.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.