Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Tracking fires before consent: how to find and fix it

OPS-320High impactDetectedBy FunnelGuardPublished Updated
On this page

What this issue is

Under GDPR, UK GDPR and the ePrivacy rules, non-essential cookies and similar tracking (analytics, advertising, remarketing) generally need the visitor's consent first. Tracking fires before consent means your site sends tracking requests to platforms such as Google, Meta or TikTok before that consent exists. It also covers the case where the visitor clicked Reject and the tags still ran.

Why it costs you leads or sales

The direct risk is regulatory and reputational: complaints, fines and distrust from visitors who chose to refuse tracking. There is also a data cost. Platforms may receive data you should not hold, which can force you to clean up audiences and reports.

Where consent should sit in the journey
  1. Visitor landsPage loads, banner appears
  2. Tags fireGA4, Ads, Meta send hits before any choice
  3. Visitor clicks RejectChoice is recorded too late
  4. Data already sentPlatforms hold data without consent

The break is the tags loading before the visitor has answered the banner.

Consent should gate the tags

When the banner is wired correctly, tags wait for the visitor's choice.

How to check if your site has it

Test it yourself in five minutes
  1. Open a clean session

    Use a private window with extensions off, ideally with a VPN or setting that shows the EU or UK banner.

  2. Open DevTools before loading

    Press F12, go to the Network tab and tick Preserve log. Then load your page without touching the banner.

  3. Look for tracking requests

    Filter for collect, g/collect, googleads, doubleclick, facebook.com/tr, analytics.tiktok.com and similar. Any request before you click means tags fire pre-consent.

  4. Check cookies

    In Application > Cookies, look for _ga, _gcl_au, _fbp and similar before you choose anything.

  5. Repeat after clicking Reject

    Reload, reject, and browse a couple of pages. Marketing requests should stay absent.

How to fix it

The principle is the same everywhere: default every non-essential category to denied, and let tags run only when the matching consent is granted. Pick your platform below.

Block tags until consent, by platform
  1. Set default consent to denied

    Use your CMP's Google Tag Manager template and make sure it fires on the Consent Initialization trigger, before any other tag, with analytics_storage, ad_storage, ad_user_data and ad_personalization set to denied by default.

  2. Turn on consent checks in tags

    In Tag > Advanced Settings > Consent Settings, require ad_storage for ad tags and analytics_storage for analytics tags. For tags without built-in checks, choose Require additional consent.

  3. Remove consent-free triggers

    Check that no Custom HTML tag with a pixel fires on All Pages without a consent condition.

  4. Preview and test

    Use Tag Assistant preview and check the Consent tab shows denied on the first page view.

Google consent defaults before any taghtml
<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>
<!-- Load your tag manager or gtag.js AFTER this block -->
<script>
// Call this from your banner when the visitor accepts
function onConsentGranted() {
  gtag('consent', 'update', {
    ad_storage: 'granted',
    ad_user_data: 'granted',
    ad_personalization: 'granted',
    analytics_storage: 'granted'
  });
}
</script>
Before and after

Before

  • Tags load on page view
  • Banner choice is recorded but ignored
  • Cookies like _ga and _fbp appear instantly

After

  • Defaults set to denied
  • Tags wait for the matching category
  • No tracking requests until Accept

How to confirm it's fixed

Confirmation checklist
  • Fresh private window shows no tracking requests before you click the banner
  • No _ga, _gcl_au, _fbp or similar cookies before consent
  • After Reject and a reload, still no marketing or analytics requests
  • After Accept, tags fire once and conversions still arrive in GA4, Ads and Meta
  • Tested on your key pages and on form thank-you pages
  • Tested on mobile and from an EU or UK location

How to prevent it happening again

Most regressions come from someone adding a new pixel, plugin or theme update outside the consent setup. Keep one rule: every new tag goes through the tag manager or CMP, with a consent requirement set when it is added.

Habits that keep it fixed
  • Keep one owner for tags and consent settings
  • Review the tag list every quarter and after each redesign
  • Re-run the DevTools test after plugin, theme or CMP updates
  • Never paste pixel code directly into themes or page builders
  • Run an automated check on a schedule

How FunnelGuard handles this

FunnelGuard detects this today. Its consent-denied check loads your journey as a robot visitor who refuses consent, then looks at which tracking hits go out to platforms such as GA4, Google Ads, Meta, TikTok, LinkedIn, Bing, Pinterest, Snapchat, X and Reddit. If tracking still fires with consent denied, it is flagged.

Questions people ask

Why is my tracking firing before cookie consent?

Usually a tag is loaded outside your consent tool, for example a pixel pasted in the theme, a plugin that injects it, or a tag manager trigger with no consent condition. The banner records the choice but nothing tells the tags to wait.

How do I check if GA4 fires before consent?

Open a private window, open DevTools, go to the Network tab and load your site without clicking the banner. Filter for collect or google-analytics. Any request before you choose means GA4 is firing without consent.

Does Google Consent Mode stop tags firing before consent?

Consent Mode lets Google tags adjust their behaviour based on a denied or granted signal, so with denied defaults they limit cookies and identifiers. It does not control other vendors' pixels, so Meta, TikTok and others still need to be blocked or gated separately.

How do I stop the Meta pixel loading until consent?

Load the pixel through your tag manager with a consent requirement, or through a CMP that blocks it by category. Remove any copy pasted directly in your theme, or it will still load.

Do I need consent before loading Google Analytics in the EU or UK?

In most cases analytics cookies need consent under ePrivacy rules, though some countries allow limited exemptions. Check the rules where you operate and ask a privacy professional if unsure.

Why do tags still fire after I click Reject?

The reject choice is probably not wired to the tags, or a hard-coded script ignores it. Check tag consent settings in your tag manager and remove scripts that sit outside it.

Can FunnelGuard tell me if tracking fires before consent?

Yes. Its consent-denied check runs your journey as a robot that refuses consent and flags tracking hits that still go out to ad and analytics platforms. You get an 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.