How to check if your ecommerce store fires cookies before consent
Your consent banner is live. It says the right things. But somewhere in the page, a Meta Pixel fires before the visitor has clicked anything. A Google Analytics session starts the moment the homepage loads. The banner is real. The consent is not.
Pre-consent cookies are the most common GDPR violation in ecommerce. They are also the easiest to miss because they happen silently, in the first few hundred milliseconds of a page load, before the visitor has had any chance to respond to your banner.
This guide walks you through a manual audit using Chrome DevTools. No third-party tools required. The method works on any ecommerce platform: Shopify, WooCommerce, Magento, BigCommerce.
What you are looking for
A pre-consent cookie is any non-essential cookie present on a visitor's device before they have interacted with your consent banner. The legal standard under GDPR and the ePrivacy Directive is strict: consent must come before the cookie is set, not simultaneously and not on the next request.
The audit tests three browser states and compares the cookie sets across them. Any non-essential cookie appearing in the first two states is a violation.
Step 1: Open incognito, open DevTools, navigate to your store
Open Chrome and start a new incognito window. This clears all existing cookies and browser storage, simulating a first-time visitor with no prior consent history. Using your regular browser window would include cookies from previous sessions, which corrupts the results.
Open DevTools by pressing F12 or right-clicking anywhere on the page and selecting Inspect. Navigate to the Application tab at the top of the DevTools panel. In the left sidebar, expand the Storage section and click Cookies. Select your site's domain from the list underneath.
You should see an empty cookie table at this point. If cookies are already present, you likely opened a non-incognito window. Close and start again.
Type your store URL in the address bar and press Enter. Keep DevTools visible so you can watch the cookie table in real time as the page loads.
Step 2: Before clicking anything, note all cookies present
Let the page load fully. Watch the cookie table in the Application tab as scripts execute. Cookies will appear as each script initializes.
Critical: do not click anything on the consent banner. Do not dismiss it, scroll past it or close it. Let the page settle, then stop. Every cookie visible in the table at this moment is a pre-consent cookie.
Take a screenshot of the cookie table or write down every cookie name. For each cookie, note the name, the domain it was set on (first-party vs third-party) and whether it looks like a session, cart or security token.
Cross-reference each name against the essential cookies table later in this guide. Any cookie not in that essential list at this stage is a violation.
Also open the Network tab at this point. Filter by third-party domains and look for outbound requests to google-analytics.com, connect.facebook.net, criteo.net, DoubleClick or similar advertising and analytics domains. These requests transmit data before consent even if they do not always leave a visible first-party cookie in the Application tab.
Step 3: Click Reject All, note which cookies remain or appear
Without clearing cookies, find the Reject All, Decline or Refuse button on your consent banner and click it. If your banner has no clearly visible Reject All option at the first layer, that is itself a compliance issue: GDPR requires that rejecting consent must be as easy as accepting it.
After clicking Reject All, reload the page. Watch the cookie table again as the page reloads.
Document every cookie present after the reload. Any non-essential cookie that is still present, or any new non-essential cookie that appeared after the reload, is a violation. After a rejection, only essential cookies required for site function should be present.
A common finding at this stage: cookies set during the pre-consent state persist through the reload because they were written to storage and the site is not clearing them on a rejection signal. Others appear for the first time after a reload because some scripts fire on the second page view regardless of the rejection decision.
Step 4: Clear cookies, reload, click Accept All, note all cookies
Right-click on your domain in the Application tab's Cookies section and select Clear to remove all cookies. Then reload the page.
This time, click Accept All on the consent banner. After accepting, reload the page and document all cookies present. This is your baseline: the full set of cookies that should only appear after explicit acceptance.
Compare this post-acceptance list against what you documented in Steps 2 and 3. Any cookie in this list that also appeared before you clicked anything in Step 2 was firing without consent. Any cookie that appeared after Reject All in Step 3 was firing against the visitor's explicit refusal.
Cookie reference table by vendor
Use this table to identify which cookies require consent. Any of these appearing in Step 2 (pre-consent) or Step 3 (post-rejection) is a violation.
| Cookie name(s) | Vendor | Requires consent |
|---|---|---|
| _fbp, _fbc | Meta Pixel (Facebook/Instagram) | Yes |
| _ga, _gid, _gat | Google Analytics (UA and GA4) | Yes |
| _gcl_au, _gcl_aw | Google Ads / Conversion Linker | Yes |
| criteo_*, cto_bundle | Criteo | Yes |
| anj, uuid2, uids | Xandr / AppNexus | Yes |
| TDID, TDCPM | The Trade Desk | Yes |
| td_*, trbo_* | RTB House | Yes |
| __kla_id | Klaviyo | Yes |
| _hjid, _hjSession* | Hotjar | Yes |
| _clck, _clsk | Microsoft Clarity | Yes |
| ttclid, _ttp | TikTok Pixel | Yes |
Platform essential cookies that are permitted without consent
These cookies are strictly necessary for the platform to function. Finding them in Step 2 or Step 3 is not a violation.
| Cookie name(s) | Platform | Purpose |
|---|---|---|
| _shopify_s, _shopify_y | Shopify | Session and visitor ID |
| cart, cart_sig | Shopify | Shopping cart persistence |
| _shopify_fs, _orig_referrer | Shopify | First session, referrer |
| woocommerce_session_* | WooCommerce | Session identifier |
| woocommerce_cart_hash | WooCommerce | Cart state |
| frontend, adminhtml | Magento | Session identifier |
| form_key | Magento | CSRF protection |
| PHPSESSID, JSESSIONID | Generic / server-side | Server session |
| csrf_token, _csrf | Generic | CSRF protection |
If you encounter a cookie not in either table, check the domain it was set on. A first-party session cookie from your own domain is likely essential. A cookie from a third-party domain is almost certainly an advertising or analytics cookie that requires consent.
What to do when you find violations
Finding a pre-consent cookie points to one of three root causes. Knowing which one applies determines the fix.
The script is hard-coded in your theme or page source
If a tag is loaded directly in your theme's <head> or body, no consent management platform can intercept it. The script fires as part of the HTML before the CMP's JavaScript has a chance to initialize. The fix is to remove the hard-coded tag from your theme and re-implement it through Google Tag Manager behind a consent trigger.
This is a common pattern on Shopify stores where apps inject tracking scripts outside of GTM, and on WooCommerce stores where analytics plugins enqueue scripts directly via functions.php.
The script is in GTM but Consent Mode is misconfigured
GTM Consent Mode requires your CMP to push a consent state to the dataLayer as early as possible in the page load, before GTM fires any default triggers. If your CMP pushes its consent signal after GTM has already initialized and evaluated its triggers, some tags will fire before the signal arrives.
Check your CMP's GTM integration documentation. The consent signal push must happen in the dataLayer initialization block, not on a callback after the banner renders. The default consent state for first-time EU visitors must be set to denied for all non-essential consent types. If GTM is configured with a default of granted, every tag fires pre-consent on the first visit.
A third-party app or plugin is injecting a script outside of GTM
Shopify apps, WooCommerce plugins and Magento extensions often inject tracking scripts independently of GTM. When you install a loyalty program, a review platform or a live chat tool, that app may set cookies on every page load with no awareness of your CMP configuration.
Identify the app responsible by using the Network tab Initiator column to trace the request back to the script file. Contact the app vendor to ask how their script respects the IAB TCF or Google Consent Mode signals. If the app does not support consent gating, consider whether it is essential or can be delayed until after consent.
Retest after every change
After making any fix, repeat the full four-step process from a fresh incognito window. A single theme update or new app install can silently reintroduce violations. Build this test into your deployment checklist and run it at least monthly against a fresh session.
Automating this test across your stack
The manual Chrome DevTools method works well for a single store tested on demand. It does not scale to continuous monitoring, does not catch regressions introduced by app updates and does not test additional page states beyond the homepage.
Complyko runs the same three-state test using a headless browser across three distinct consent states: pre-consent, post-rejection and post-acceptance. The scan captures every cookie set in each state, identifies which vendor set each cookie and flags violations against the essential cookie list automatically. The scanner also tests checkout and cart flows, where additional pixels and session tracking frequently fire independently of homepage behavior.
The output is a full report grouped by violation severity, with the specific cookie name, the vendor, the page state it was detected in and a remediation recommendation for each finding. For stores running 20 or more third-party tags, automated scanning is the only practical way to stay ahead of the problem continuously.
Complyko scans your store for pre-consent cookies automatically across all three consent states, including checkout and cart flows. Get a full violation report without opening DevTools. Free scan available.
Get your free scan →