GDPR & ePrivacy
How visitors withdraw cookie consent, and what you must do
Visitors must be able to withdraw cookie consent at any time, as easily as they gave it (GDPR Art. 7(3)). In practice that means a cookie settings link or button on every page, and when someone withdraws, your site has to stop the tracking, clean up what it can and record the change.
- Plain English
- Written for website owners
- Free to read
On this page
Under GDPR Article 7(3), visitors can withdraw consent at any time, and withdrawing must be as easy as giving consent. If someone accepted cookies with one click on your banner, they should be able to take it back with about the same effort: typically a "Cookie settings" link in the footer or a small floating button that reopens your consent options on any page. When a visitor withdraws, your site must stop the scripts that relied on that consent, remove the cookies it can, tell connected tools such as Google tags about the change, and log the withdrawal.
What the law requires
Article 7(3) has four parts:
- The person has the right to withdraw consent at any time.
- Withdrawal doesn't affect the lawfulness of processing based on consent before it was withdrawn.
- You must tell people about the right to withdraw before they give consent.
- It must be as easy to withdraw as to give consent.
Cookie consent under Article 5(3) of the ePrivacy Directive uses the GDPR's definition of consent, so these rules apply to your banner. The EDPB's Guidelines 05/2020 on consent add useful detail. Where consent is collected through a particular interface, such as a website, people must be able to withdraw through the same interface; making them switch to another channel, such as email or a phone call, just to withdraw is undue effort. Withdrawal must also be free and must not lower the level of service the person receives.
Withdrawal is also part of what makes consent freely given in the first place. If refusing or withdrawing is difficult, the original consent is weaker too. See GDPR consent requirements for how the conditions fit together.
Give visitors a way back into the settings
Once the banner closes, the visitor needs a persistent way to reopen their choices. The common options:
| Option | Pros | Cons |
|---|---|---|
| Footer link ("Cookie settings") | Familiar, unobtrusive, works on every page with a shared footer | Easy to miss on long pages or pages without a footer, like checkout |
| Floating cookie button | Always visible, one click from anywhere | Can overlap chat widgets or "back to top" buttons; needs a clear label for screen readers |
| Link in the cookie policy | Useful for people who go looking for it | Not enough on its own: it's an extra step compared with a one-click banner |
| Account settings page | Good for logged-in users who expect privacy settings there | Doesn't help visitors who aren't logged in |
A footer link plus a floating button is a safe combination. Whatever you choose, label it plainly ("Cookie settings" or "Privacy choices") and make sure it opens the same category controls the banner offered, not a page of text with instructions for clearing browser cookies.
Make the control reachable by keyboard and screen readers, and check it on mobile, where floating buttons are often hidden behind other elements. Regulators have criticized banners that make withdrawal hard to find; our guide to cookie banner dark patterns covers what they flag.
If you add the link yourself on top of a consent tool, it's usually one line that calls the tool's API. In PrivacyQuick, for example, a floating cookie button is built in, and a footer link looks like this:
<button type="button" onclick="PrivacyQuick.open()">Cookie settings</button>
What has to happen when someone withdraws
Saving the new choice is the easy part. The harder part is making the page and the tools on it actually behave differently. Work through these layers:
1. Stop new scripts from loading
Scripts that are blocked until consent should no longer load on the next page view. If your blocking works by category, this happens automatically once the stored choice changes. Check it in a private window: accept, withdraw, then navigate and confirm the scripts no longer load.
2. Deal with scripts already running
This is where most setups fall short. A tracking script that loaded after consent keeps running in the current page until the page is closed or reloaded. Changing a stored preference doesn't unload it. You have two ways to handle it:
- Tell the tool to stop. Some tools have a consent API. Google tags react to a Consent Mode update setting the relevant signals to
denied, and the Meta Pixel supportsfbq('consent', 'revoke'). See Google Consent Mode v2 and Meta Pixel and GDPR. - Reload the page. For tools without a reliable stop switch, a reload clears everything from memory, and the blocked scripts then stay blocked. It's blunt but dependable.
Here's a pattern that reacts to a change using the same API; other consent tools have similar events:
PrivacyQuick.on('change', function () {
if (!PrivacyQuick.has('marketing') && window.fbq) {
fbq('consent', 'revoke');
}
});
In that setup the built-in Consent Mode integration sends the Google update for you, and withdrawing a category whose scripts already ran reloads the page so those scripts are gone.
3. Remove cookies and storage you control
Withdrawal means you must stop accessing the information on the device, and removing first-party cookies and storage that your site set for the withdrawn purpose is good practice. To delete a cookie with JavaScript, you set it again with the same name, path and domain and an expiry in the past:
function deleteCookie(name, domain) {
document.cookie = name + '=; Max-Age=0; path=/' +
(domain ? '; domain=' + domain : '');
}
// GA4 sets _ga and _ga_<ID> on your registrable domain
deleteCookie('_ga', '.example.com');
localStorage.removeItem('some_analytics_key');
There are limits. You can't delete cookies set on another domain (true third-party cookies), and JavaScript can't touch HttpOnly cookies, which need a server response to clear. You also need the exact name, path and domain, which is why an up-to-date cookie inventory matters. Run a fresh scan or check DevTools to confirm the exact attributes before you write cleanup code.
4. Update server-side processing
If you forward events from your server, for example through server-side tagging or a conversions API, the server needs the new consent state too. Otherwise the browser stops tracking but your server keeps sending the same data to the same platforms.
5. Log the withdrawal
Record the withdrawal like any other decision: consent ID, timestamp, action, remaining categories and banner version. It shows that you honored the change and helps you answer complaints. Our guide to proof of consent records lists the fields.
Test withdrawal the way you test acceptance: accept all, check what loads, withdraw, then confirm in DevTools that no new requests go to the withdrawn vendors and that your own cookies for that category are gone.
What about data already collected?
Withdrawal doesn't make earlier processing unlawful. It does mean that, from that point, you can't keep processing the person's data on the basis of that consent. If consent was the only legal basis, Art. 17(1)(b) gives the person the right to have the data erased on request.
For typical website analytics and advertising data, you usually can't link the withdrawal to specific records held by a vendor, because the banner doesn't know who the visitor is. What you can do is stop new collection, remove the identifiers from the browser so future visits aren't linked to past ones, and handle any erasure request you receive using the identifiers the person can give you. Where data was shared with ad platforms, check each vendor's deletion tools and terms.
Withdrawal vs refusal vs expiry
These three get mixed up, and your banner should treat each correctly:
- Refusal happens on the first banner: nothing non-essential ever loads.
- Withdrawal happens later: something did load, and you now have to stop it and clean up.
- Expiry happens when your consent period ends or the banner version changes, and you ask again. See how long cookie consent lasts.
Partial withdrawal is common too: a visitor keeps analytics but switches off marketing. Your blocking, cleanup and logging should work per category, not only for "everything off".
Common mistakes
- No way back. The banner disappears after the first choice and there's no link or button anywhere to reopen it.
- Instructions instead of controls. "To withdraw consent, clear your browser cookies" puts the work on the visitor and doesn't stop server-side processing.
- Toggles that change nothing. The preference is saved, but tags in a tag manager ignore it and keep firing until the next visit, or forever.
- Re-consent pressure. Showing the banner again on every page after someone withdraws, to push them back to "Accept".
- Only "Accept all" in the settings. The reopened panel lets people add categories but not remove them.
- Missing pages. The settings link lives in a footer that isn't on landing pages, checkout or the app.
Next steps
- Add a "Cookie settings" link to your footer and, if it suits your design, a floating button. Make sure both are on every template.
- Tell visitors about the right to withdraw in the banner or first-layer text and in your cookie policy.
- Decide how each tool stops: a consent API call, a reload, or both. The JavaScript API docs show the events you can hook into.
- Write a cleanup routine for first-party cookies and storage for each category.
- Pass consent changes to any server-side tagging.
- Log withdrawals, and test the full accept-then-withdraw cycle after every site or tag change.
Frequently asked questions
How do I withdraw cookie consent on a website?
Look for a cookie settings link, usually in the footer, or a floating cookie icon, then switch off the categories you no longer want and save. You can also delete the site's cookies in your browser settings, though the site may ask you again.
Does withdrawing consent make past tracking unlawful?
No. Article 7(3) says withdrawal doesn't affect the lawfulness of processing based on consent before it was withdrawn. It does mean you must stop processing that relies on that consent from then on.
Do I have to delete cookies when a visitor withdraws consent?
You must stop reading and writing non-essential cookies, and removing the ones your site set is good practice. You can't delete cookies set by third-party domains or HttpOnly cookies from JavaScript, so stopping the scripts that use them is what matters most.
Is a link in the privacy policy enough to withdraw consent?
Usually not, if consent was given with one click on a banner. Regulators expect withdrawal to be about as easy as giving consent, so a link or button that reopens the cookie settings, available on every page, is the common standard.
Check your own website in 30 seconds
Our free scanner lists every cookie and tracker your site sets, sorted into categories, before you add a banner.
This guide is general information, not legal advice. Laws and regulator guidance change; check the current rules for your situation or ask a lawyer.