Prompt
Cookie consent banner not saving preferences
Latest observation
Oct 29, 2026
OpenAI APIWeb search: off
If your cookie consent banner isn’t saving preferences, the issue is usually one of these:
Common causes
- Cookies/local storage blocked
- The site may be running in private mode, strict browser settings, or with extensions blocking storage.
- Consent script not loading
- The banner script may fail due to a JavaScript error or blocked third-party resource.
- Preference not persisted correctly
- The banner may show on every page load if it isn’t writing the choice to a cookie or localStorage.
- Domain/path mismatch
- The consent cookie may be set for the wrong domain or path, so it doesn’t apply site-wide.
- Expiration too short
- The cookie may expire immediately or after a very short time.
- Server-side override
- Another script or tag manager setup may be resetting consent on each page load.
What to check
- Open browser DevTools → Application/Storage
- See whether a consent cookie or localStorage entry is created after accepting/rejecting.
- Check the Console for JavaScript errors.
- Verify the banner script is loaded only once and after any required dependencies.
- Confirm the cookie is set with a valid:
domainpath=/expiresormax-age
- Test with:
- all extensions disabled
- a different browser
- no private/incognito mode
If you’re the developer
- Ensure the consent state is stored in a persistent cookie or localStorage item.
- Make sure the code reading the preference runs before any tracking scripts.
- Avoid overwriting the stored value on each page view.
- If using a CMP or tag manager, confirm consent is mapped correctly to analytics/ads tags.
If you want, I can help you debug it step by step if you paste:
- the banner code,
- the browser console errors,
- or the consent cookie/localStorage key you expect to be written.