Implementing Consent Withdrawal: Stopping Tags and Cleaning Up Cookies
Withdrawal Is Half of Consent
Most teams invest heavily in collecting consent and much less in what happens when a visitor changes their mind. Yet under the GDPR it must be as easy to withdraw consent as to give it, and the same principle appears in many other regimes. Technically, withdrawal is harder than collection: scripts are already loaded, cookies already exist and ad requests may already be in flight. This guide walks through the pieces.
Step 1: Make the Control Reachable
Provide a persistent way to reopen the preferences, such as a footer link or a small floating icon. In apps, put the equivalent in the settings screen. If getting to the control takes more clicks than accepting did, you have a design problem before you have a technical one.
Step 2: Update the Stored Choice
When the visitor saves new choices, your consent tooling should overwrite the stored record, with a timestamp, and expose the new state to the page. Keep the previous record in your logs as history, but the active state must change immediately.
Step 3: Signal the Change to Tags
If you use Google Consent Mode, issue an update command that sets the revoked consent types to denied. Tags that respect the signals then adjust their behaviour. For tags managed by a tag manager, make sure triggers key off the consent state, and add a trigger for the change event so that tags can react when consent moves from granted to denied, not only the other way round.
Step 4: Stop Scripts That Do Not Listen
Not every third-party script understands consent signals. For those, you have three realistic options:
- Disable on next load. Prevent the script from loading on later page views. Simple, but the current page keeps running it.
- Reload the page. Reloading after withdrawal restarts the page with the script blocked. This is blunt but reliable.
- Call the vendor's opt-out API. Many tools expose a function to stop collection. Use it where available, and test that it works.
Step 5: Remove Cookies and Storage
Delete first-party cookies and local storage entries belonging to the withdrawn purposes. You can do this reliably for items your own domain controls. Third-party cookies set by other domains cannot be deleted from your page; they are cleared when the vendor stops receiving requests and the cookies expire, or when the user clears them. Be honest about this in your cookie notice rather than promising instant removal of everything.
Step 6: Update Ad Requests
For ad-supported sites, withdrawal changes what you may send to the ad server. Refresh the consent values attached to subsequent ad requests so that they reflect personalised ads being off. Refreshing the whole ad slot set after the change avoids showing personalised ads the visitor just declined. If you use TCF, the string should be regenerated so that downstream vendors read the new state.
Step 7: Server-Side and Downstream Systems
If events are forwarded from a server, make sure the server sees the updated consent state. A common bug is a server container that keeps using the first consent value it saw for a session. Where you have shared the visitor's data with partners, check whether your agreements require you to pass the withdrawal on.
Test It
Accept everything, confirm trackers fire, withdraw, then check network requests, cookies, storage and the consent signals on the page. Repeat on mobile and in a second language. Withdrawal flows break quietly after redesigns, so keep them in your regression tests.
How FlexyConsent Helps
FlexyConsent supports IAB TCF 2.4, IAB GPP v1.1 and Google Consent Mode v2, so withdrawn choices can be expressed through the standard signals that ad tech and Google tags read. It is a Google-certified CMP (ID 317) and the banner is available in 58 languages.
Key Takeaways
- Withdrawal must be as easy to reach and use as giving consent.
- Update the stored record and the consent signals immediately.
- Scripts that ignore signals need blocking, an opt-out call or a reload.
- Clear first-party storage; be honest about what you cannot delete from third parties.
- Refresh ad requests and server-side consent state after a change.