Let visitors change their consent choice from any page of your site
Give visitors a way back to the Privacy Preferences Center of TermsFeed Privacy Consent with a floating button, a link on your pages, or a JavaScript call. The consent banner does not return once a visitor answers, so without one of these a visitor who clicked I Agree has no way to change the choice. The General Data Protection Regulation (GDPR) requires that withdrawing consent is as easy as giving it, in Article 7(3).
A way back matters for visitors who never saw the consent banner too. Under the "Standard" consent logic, visitors outside the opt-in regions load every vendor without being asked, and the Privacy Preferences Center is their route to refuse.
3 ways to open the Privacy Preferences Center
Privacy Consent opens its Privacy Preferences Center from a floating button it adds, from an element of your page, or from a JavaScript method. All 3 open the same place, where the visitor switches vendor categories and vendors and clicks Save Preferences. The visitor reads the label "Privacy Preferences", since the name "Privacy Preferences Center" appears only in these docs and the app.
| Method | What you do | When to use it |
|---|---|---|
| Floating button | Turn on a switch on the Appearance page | You do not edit templates, or some pages have no footer |
Element with the ID open_privacy_preferences_element |
Add a link or a button to your footer | Most sites: a plain link beside your Privacy Policy |
window.termsfeed_privacy_consent.v1.openPrivacyPreferences() |
Call the method from your own code | Menus and components built in JavaScript |
Method 1: Turn on the floating Privacy Preferences button
Turn on "Use a sticky button to open the Privacy Preferences Center?" on the Appearance page, then click "Save Appearance". Privacy Consent then shows a "Privacy Preferences" button on every page, for every visitor, whether or not that visitor answered.
The button is off on a new consent banner. On "Card", "Bar", and "Panel" it sits 16px from the bottom, on the side you picked for "Banner position". On "Simple" and "Headline" it sits 12px from the bottom right corner. Move it away from a chat widget with Custom CSS.
Method 2: Add a link with the open preferences ID
Add an element with the ID open_privacy_preferences_element to your pages, and a click on it opens the Privacy Preferences Center. Put it in the footer template, so it appears on every page.
<a href="#" id="open_privacy_preferences_element">Privacy Preferences</a>
Follow these rules for the element.
- Use a link or a button. An
<a href="#">or a<button type="button">takes the keyboard focus, and a<div>or<span>with the ID does not. - Keep the address empty or
#. Privacy Consent stops anhref="#"link from jumping to the top of the page, and any other address takes the visitor away. - Use the ID once per page. Give a second link on the same page the class
termsfeed-pc1-open-privacy-preferencesinstead. - Add it at any time. A footer that your theme or framework renders after the page loads works as well as one in the HTML.
Menu editors in WordPress and Shopify give a menu item no ID field. Add the link through a Custom HTML block, a footer widget, or the footer template of your theme instead.
Method 3: Call the JavaScript method
Call window.termsfeed_privacy_consent.v1.openPrivacyPreferences() from your own click handler to open the Privacy Preferences Center from a menu or component that your code builds. The method takes no arguments and returns nothing.
This button checks that the script has loaded before it calls the method, so a click during page load does not throw an error.
<button type="button" onclick="window.termsfeed_privacy_consent && window.termsfeed_privacy_consent.v1 && window.termsfeed_privacy_consent.v1.openPrivacyPreferences()">Privacy Preferences</button>
The method does nothing until Privacy Consent is ready. A call before that prints [ee][478058ef] in the Console tab and is not queued, so call it from a click and not during page load. Hand a component to your developer with the JavaScript API Reference.
Where to put the preferences link
Put the link in the footer of every page, beside the links to your Privacy Policy and Cookies Policy. Visitors look for privacy controls there, and a site-wide footer reaches every page with a single edit.
Name the link plainly, such as "Privacy Preferences", which matches the label on the floating button, "Cookie Settings", or "Privacy Choices". Avoid a bare icon with no text and a label such as "More". A link that appears only on your Privacy Policy or Cookies Policy page adds a page load and a search before the first step. Pages with no footer, such as checkout steps and landing pages, need the floating button instead, and the floating button works beside a footer link.
European regulators accept a floating icon or a link in a visible, standard place, impose neither one, and assess each route case by case. The source is paragraphs 32 to 35 of the European Data Protection Board (EDPB) report on cookie consent banners of 17 January 2023. The UK regulator, the ICO, sets the same rule in its guidance on managing consent.
Visitors in the US who do not get a consent banner reach their opt-out choices through the "Your Privacy Choices" control. Set up that control with The Do Not Sell or Share Control.
What 2 steps from any page means
A visitor withdraws consent in 2 steps from any page: open the Privacy Preferences Center, then change the vendor categories and click Save Preferences. The first step is a click on your link or the floating button. The second step takes 1 click per vendor category the visitor switches off and 1 on Save Preferences, so withdrawing 1 vendor category takes 3 clicks in total. Close, ×, and the Escape key save nothing.
Count the steps from the deepest page of your site, such as an old blog post or an order confirmation. A template without your footer, or a page built in another tool, drops the link and adds steps for every visitor who lands there. Run the full test with How to add and test a preferences link.
What happens when a visitor withdraws consent
Privacy Consent saves and logs the new answer at once, and a vendor that already ran stops at the next page load.
- The saved answer. The browser record changes at once, and the consent log receives
reject_allwhen every non-essential vendor category is off oraccept_somefor a partial withdrawal. - Vendors running on the current page. A vendor that already ran keeps running until the next page load, with its scripts, HTML, and embeds in place. Its on-decline vendor tag does not run on that page.
- Consent signals. A vendor added from a template with consent signals, the messages that tell Google, Microsoft, Meta, TikTok, and Pinterest the answer, sends the update at once.
- Later pages. The next page load skips the on-accept vendor tags and runs the on-decline vendor tags. The answer holds until it expires or you change a vendor.
Privacy Consent does not delete cookies a vendor set before the withdrawal, so those cookies stay in the browser until they expire. Decide what each vendor does on withdrawal with Vendor Tag Trigger Actions. Ask your developer to react to the new answer with Callbacks and Consent Semantics.
How to add and test a preferences link
Adding and testing a way back takes 6 steps and about 15 minutes. You need the snippet on your website, and edit access to your footer or to the Appearance page. Test from the page a visitor reaches last, because that page is the first to lose the link.
- Turn on the floating button on the Appearance page and click "Save Appearance", or add the link or button to your footer template. Publish the change and clear the page cache of your site.
- Close every private window, open a new one, load your website, and click I Agree on the consent banner.
- Browse to your deepest page without opening a policy page, and find your link or the floating button. Good candidates are a checkout confirmation page, an account page, a 404 page, and a landing page built outside your main theme.
- Open the Chrome DevTools Network tab, tick "Preserve log", and filter for
events.push. Click your link or the floating button, and confirm in the Elements tab that#termsfeed_pc1_preferences_centerappears at the end of<body>. - Switch off every non-essential vendor category and click Save Preferences. A request to
cdn.termsfeedtag.comappears in the Network tab with the status 201, which is the consent log receiving the withdrawal. In the Application tab, open Local storage, select your origin, and read the keytermsfeed_privacy_consent_state, where theanalyticsentry shows"enabled":false. - Reload the page, clear the filter, and type the host of one of your vendors, such as
connect.facebook.net. No request appears after the reload, and a Google vendor template keeps sendinggcs=G100pings, its denied state.
Repeat the test on each page template that has its own footer. A new floating button reaches visitors within 1 hour. Fix a link that opens nothing with Preferences Not Opening.