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.
- Page loadsBanner script and tags start together
- Tags fireGA4, Ads and Meta send hits with no consent
- Banner shownVisitor sees the choice too late
- 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
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.
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.
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.
Check cookies
In the Application tab, look under Cookies. Cookies such as _ga or _fbp present before any click are a further sign.
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).
<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>Enable consent overview
In your container go to Admin > Container Settings and tick Enable consent overview.
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.
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.
Remove hard-coded copies
Delete any tag snippets pasted directly into the site theme, or they will still fire without consent.
Use your CMP plugin's blocking option
In your consent plugin's settings, turn on script blocking or auto-blocking until consent. The exact menu name depends on the plugin.
Check other plugins
Plugins that add GA4 or Meta pixel (such as an SEO, analytics or ads plugin) may inject tags on their own. Disable that output or connect it to the consent plugin.
Clear caches
Purge page and CDN caches so old pages without blocking are not served.
Use Customer Privacy settings
In Settings > Customer privacy, configure the cookie banner and regions where consent is required.
Move pixels to Customer events
Add tracking pixels under Settings > Customer events so Shopify applies the visitor's consent. Remove copies pasted into theme.liquid.
Check apps
Some marketing apps add their own scripts. Review each in its settings for a consent option.
Remove tags from custom code
In Project Settings > Custom code, remove GA4, Meta or other tag snippets from the head and footer.
Load them through your CMP or GTM
Add the consent default snippet first in the head, then load tags via Google Tag Manager with consent settings or through your CMP's script manager.
Use Cookie Banner and Marketing Integrations
In Settings, set up the Wix cookie banner and add tracking through Marketing Integrations or Custom Code with the right cookie category selected, such as Marketing or Analytics.
Avoid the Essential category
In Custom Code, do not tag ad or analytics scripts as Essential, because Essential scripts load without consent.
Review Cookie Banner settings
In Settings > Cookies & Visitor Data, enable the cookie banner and set the visitor data behaviour.
Check Code Injection
Scripts pasted into Code Injection run for everyone. Move them into Google Tag Manager with consent settings.
Check tracking code locations
In your funnel or website settings, look at the head and footer tracking code. Tags pasted there run on page load.
Load tags through GTM
Put one GTM snippet there, with the denied default first and consent settings on each tag, instead of pasting several pixels.
Put the default consent first
Place the gtag consent default snippet above the Google tag or GTM snippet.
Load non-Google pixels only after consent
Wrap pixels such as Meta in a function and call it from your CMP's accept callback, or use the pixel's own consent calls, such as fbq('consent','revoke') before init and fbq('consent','grant') after accept.
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
- 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.
With a denied default, tags are held back until the visitor chooses.
How to prevent it happening again
- 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.
Related issues
- TRK-283Tags still fire after visitor rejectsFix guide
- TRK-285Consent Mode default state not set before tags loadFix guide
- TRK-284Consent Mode v2 not implemented (no gcs/gcd)Fix guide
- TRK-303Cookies set before consent (_ga, _fbp)Fix guide
- TRK-296CMP script fails to load, blocking all tagsFix guide
- TRK-298CMP categorises analytics tag wrongly (necessary vs marketing)Fix guide