Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Consent choice not remembered across pages: how to fix it

TRK-304Medium impactCould addBy FunnelGuardPublished Updated
On this page

What this issue is

A consent management platform (CMP) is the tool behind your cookie banner. When someone clicks Accept or Reject, it stores that choice, usually in a first-party cookie or in browser local storage. On the next page it reads the choice back and does not ask again.

This issue means that step fails. The visitor chooses, then sees the banner again on the next page, or the choice is saved but your tags do not get it, so they behave as if no choice was made.

Why it costs you leads or sales

Repeated banners annoy visitors and cover buttons and forms. Many leave or click Reject just to get rid of it. If the saved choice is not passed to Google Consent Mode or your tag manager, conversions from people who accepted are sent as denied, so ad platforms see fewer sales and bid on weaker data.

Conversions reported when consent is lost between pagesExample numbers
Conversions reported when consent is lost between pages (example)Real purchases: 100 conversions; Reported, choice remembered: 95 conversions; Reported, choice forgotten: 55 conversions038771009555Real purchasesReported, choice reme…Reported, choice forg…conversions

Example: 100 real purchases from visitors who accepted cookies. Numbers are illustrative only.

Where the choice gets lost
  1. Landing pageVisitor clicks Accept
  2. Save choiceCookie not written or wrong domain
  3. Next pageBanner shown again, tags denied
  4. CheckoutPurchase tracked without consent

The visitor accepts once, but the choice never reaches the next page.

How to check if your site has it

Test it in your browser
  1. Open a clean window

    Use a private window with no extensions that block cookies or scripts.

  2. Accept on the first page

    Click Accept (or your normal choice) on the banner.

  3. Open DevTools storage

    Press F12, go to Application (Chrome) or Storage (Firefox), then Cookies and Local Storage. Look for your CMP's entry, for example a cookie named like the CMP, such as CookieConsent, OptanonConsent or cookieyes-consent.

  4. Check its attributes

    Confirm it has a future expiry, Path set to /, and a Domain that matches your site.

  5. Click through to other pages

    Visit two or three more pages, and the checkout or form page. The banner should stay hidden and the cookie should stay the same.

  6. Check the tags

    In the Network tab, confirm tags such as GA4 requests carry the granted state after the page change (for Consent Mode, look at the gcs parameter).

What you see and the likely cause
SymptomLikely cause
No consent cookie appears after AcceptCookie blocked, script error, or CMP storing nothing
Cookie exists but banner returnsWrong path or domain, or CMP reads a different cookie name
Cookie disappears at tab closeNo expiry set (session cookie)
Works on some pages onlyCookie path set to a subfolder, or pages on another subdomain
Banner hidden but tags deniedTags load before the saved state is read

How to fix it

The cause depends on your CMP and platform. Work through the common causes first, then use the tab for your setup.

Common fixes for any site
  1. Set a sensible cookie lifetime

    In your CMP settings, set consent expiry to months, not a session. Many regions allow up to about 12 months before asking again, but check your own legal advice.

  2. Set path to / and the right domain

    The cookie must be available on every page. Use your root domain (for example .example.com) if you also use subdomains.

  3. Exclude the CMP from caching and minifying

    Do not cache the consent cookie in a way that serves one visitor's state to another, and do not combine or delay the CMP script so it runs late.

  4. Remove duplicate CMPs

    Two banner plugins or a theme banner plus a CMP overwrite each other's cookies. Keep one.

  5. Read saved consent before tags fire

    Make sure the CMP loads first and sends the stored state as the Consent Mode default or update on every page.

Fix by platform
  1. Use one consent plugin

    Deactivate extra banner plugins and any theme cookie notice so only one writes the cookie.

  2. Exclude from caching

    In your cache or optimisation plugin, exclude the consent script from delay, defer and combine options, and make sure full-page caching does not hide the banner state.

  3. Clear caches

    Purge page cache, CDN cache and any object cache, then retest in a private window.

Save and read a consent choice (custom setup)javascript
function saveConsent(choice) {
  var d = new Date();
  d.setTime(d.getTime() + 180 * 24 * 60 * 60 * 1000);
  document.cookie = 'site_consent=' + choice +
    '; expires=' + d.toUTCString() +
    '; path=/; SameSite=Lax; Secure';
}

function readConsent() {
  var m = document.cookie.match(/(?:^|; )site_consent=([^;]*)/);
  return m ? m[1] : null;
}

window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
var saved = readConsent();
gtag('consent', 'default', {
  ad_storage: saved === 'granted' ? 'granted' : 'denied',
  ad_user_data: saved === 'granted' ? 'granted' : 'denied',
  ad_personalization: saved === 'granted' ? 'granted' : 'denied',
  analytics_storage: saved === 'granted' ? 'granted' : 'denied'
});
Consent handling before and after the fix

Choice forgotten

  • Banner returns on each page
  • Cookie has no expiry or wrong path
  • Tags start as denied on every load

Choice remembered

  • Banner shows once per visitor
  • Cookie lasts months on path /
  • Saved state applied before tags fire
Try it: does the site remember the choice?Interactive
Consent cookie not saved

Not saved

Leads or data lost

The banner reappears on every page and tags fall back to denied, so accepted visitors are under-reported.

Toggle the cause to see the effect on the visitor and on tracking.

How to confirm it's fixed

Confirmation checks
  • Banner appears once in a private window, then stays hidden on at least five pages
  • Consent cookie has a future expiry, Path / and the right domain
  • Closing and reopening the browser keeps the choice
  • Reject is remembered as well as Accept
  • GA4 and ad tags show the granted state on page two and on the thank-you page
  • Works on mobile and on every domain or subdomain in the funnel

How to prevent it happening again

Retest after theme changes, new plugins, cache or CDN changes, and CMP updates. Keep a single CMP, document its cookie name and expiry, and add a consent check to your release checklist. When you change domains or add a checkout subdomain, test the full path again.

How FunnelGuard handles this

FunnelGuard does not check this yet. Whether a consent choice is remembered across pages is a possible future check, but it is not something FunnelGuard reports today.

Nearby, FunnelGuard runs your real customer journeys on a schedule from the EU or the US, checks each step and the tracking hits sent to GA4, Google Ads, Meta and other platforms, and sends one alert with a screenshot after a second-region re-check. A missing tracking hit on a later step can be a clue to look at consent, but it does not tell you the cause.

To watch for this yourself, repeat the browser test above after each site change, or use your CMP's own reports and the Tag Assistant preview in Google Tag Manager to confirm the consent state on page two and beyond. FunnelGuard also offers a free read-only website audit if you want a first look at your tracking.

Frequently asked questions

Questions people ask

Why does my cookie banner keep showing on every page?

The choice is not being saved or read back. Common causes are a consent cookie with the wrong path or domain, no expiry, a caching plugin interfering, or two banners overwriting each other. Check the cookie in your browser's DevTools after clicking Accept.

Why is my consent not remembered after I click Accept?

Usually the CMP cannot write its cookie or local storage entry. Browser settings, script errors, a blocked CMP script or a cookie set on the wrong domain can all cause it. Test in a private window without extensions to narrow it down.

How long should a cookie consent choice be remembered?

Set it to a fixed period of months rather than a session. Many sites use up to about 12 months, but the exact limit depends on your legal advice and CMP. Make sure the same period applies to Accept and Reject.

Does forgetting consent affect Google Ads and GA4 data?

Yes. If your tags see denied consent on pages after the choice, conversions from people who accepted can be reported with limited data or missed. That makes campaign results look worse than they are.

Why does consent work on the homepage but not at checkout?

Checkout may be on a different domain or subdomain, where the cookie is not shared. Set the cookie on the root domain if you use subdomains, or run the CMP with shared consent across domains if it supports it.

Can a caching plugin break cookie consent?

Yes. Delaying, combining or caching the CMP script can make it run late or serve the wrong state. Exclude the consent script from those options, purge caches and retest.

Does FunnelGuard detect when consent is not remembered?

No, not yet. It is a possible future check. For now, test manually in a private window and use your CMP reports or Tag Assistant to confirm consent state across pages.

Does FunnelGuard catch this?

Could add

Not checked yet: could be added to FunnelGuard.

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.