Severity: MediumOwner: DevTime to fix: 30-90 min
Consent state not persisted
Fix consent storage and reload behavior so the visitor’s choice is remembered and enforced across pages and sessions.
Covers: consent_not_persisted, consent_state_lost
Why this matters
If consent resets on reload or across pages, users may be repeatedly prompted or optional processing may restart without respecting their previous choice.
How to verify manually
- Accept or reject on one page, then reload and navigate to other pages.
- Confirm the same consent choice is still in effect across the site.
- Inspect the persistence mechanism used for consent storage.
Typical root causes
- The consent cookie or local storage entry is not written consistently.
- Subdomain, path, or SameSite settings prevent persistence.
- SPA navigation resets state because consent is stored only in memory.
GTM fix
- Ensure consent state is read from a persistent source on every page.
- Do not rely on one-time runtime variables that disappear after navigation.
- Validate consent persistence in GTM preview across reloads.
WordPress fix
- Review CMP plugin storage settings, domain scope, and multilingual path handling.
- Test whether caching or security plugins strip or reset consent storage.
- Verify the plugin respects the same stored choice on every template.
Generic fix
- Persist consent in a stable cookie or equivalent storage with correct domain and path scope.
- Reload consent state before optional tags initialize on each page.
- Keep consent storage logic centralized instead of duplicating it per route.
How to confirm the fix worked
- Confirm the same choice persists after reload and cross-page navigation.
- Confirm Reject remains denied after revisit.
- Run a fresh scan and verify persistence-related regressions no longer appear.
Next step
Re-scan after deployment to confirm that the runtime behavior changed, not just the banner copy.