CookiePal Logo
CookiePal Logo
Log in

Features

Utilize advanced features and integrate CookiePal with other tools.

Add a "Manage cookies" link to your site

Give visitors a way to re-open the banner and revoke previously-granted consent. Required under LGPD Art. 8 §5 (Brazil) and aligned with GDPR Art. 7 §3 withdrawal rights.

Table of contents

back

to the top

Add a "Manage cookies" link or button to your site so visitors can change their mind and revoke a previously-granted consent at any time. CookiePal handles the server-side revocation, the cookie cleanup, and the banner re-display — you only need to add a single HTML attribute.

Add the data-cookiepal-reopen attribute

1. Add a link or button somewhere persistent on your site (typically the footer):

<a href="#" data-cookiepal-reopen>Manage cookies</a>

2. The CookiePal banner script automatically detects any element carrying the data-cookiepal-reopen attribute and wires a click listener to it.
3. When the visitor clicks it, the script revokes their current consent server-side, clears non-necessary cookies, and re-opens the banner so the visitor can submit fresh choices.

1<a href="#" data-cookiepal-reopen>Manage cookies</a>

How the revocation flow works

When a visitor clicks the link, CookiePal performs four steps:

1. Calls our revocation API (POST /consent/{consentId}/revoke) with the visitor's consent ID and the reason user_request.
2. Clears every non-necessary cookie that your category configuration declares.
3. Wipes the cookiepal-consent and euconsent cookies on the root domain so the banner state machine returns to "no action recorded".
4. Tears down the current banner UI and re-renders it for a fresh prompt.

The flow is idempotent: clicking the link a second time on a record that's already revoked is treated as success.

Trigger revocation from your own JavaScript

If you cannot use the attribute (for example, if you render the link inside a Shadow DOM that the banner observer can't reach), call the API directly from your own JavaScript:

1window.cookiepal.api.reopenAndRevoke();

The function returns a Promise you can await. Listen for the cookiepal_consent_revoked custom event on window if you want to react in your own analytics layer.

1window.addEventListener('cookiepal_consent_revoked', () => {
2  // your app-level cleanup here
3});

What cookies get cleared

CookiePal clears the cookies it knows about — every cookie declared under a non-necessary category in your Cookie Categories settings, plus the cookiepal-consent and euconsent state cookies.

Cookies set by your own application that are NOT declared in CookiePal categories will NOT be cleared. If your application stores user-tracking data (e.g. in localStorage or an app-managed cookie), clear that yourself inside the cookiepal_consent_revoked event listener shown above.

Any Questions Left?

Feel free to contact us and we will answer all of yours remaining questions!

Contact Us

Elevate Your Compliance with
CookiePal Today

View PlansTry for FREE

Privacy made simple!

Powered by WESTPOINT

© CookiePal 2026. All rights reserved. CookiePal Limited is registered in the UK. Company no. 15835702.

Terms and ConditionsPrivacy PolicyGet in Touch