A link or button opens the TermsFeed Privacy Consent Preferences Center only when it carries a trigger Privacy Consent listens for and Privacy Consent has started on the page. The Preferences Center is the panel titled "Privacy Preferences", where visitors switch vendor categories and vendors on or off and click Save Preferences. Visitors need it to change or withdraw an answer, so a dead link leaves them with no way back.

Each of these triggers opens the Preferences Center, including on an element your code adds after the page loads, so choose the one your editor supports.

Trigger Where to use it
id="open_privacy_preferences_element" A footer link or button you edit in HTML
id="open_privacy_choices_element" A "Your Privacy Choices" link, which opens the Preferences Center at that heading
id="open_dnsmpi_element" A "Do Not Sell or Share" link, which opens the Preferences Center at the same heading
class="termsfeed-pc1-open-privacy-preferences" An editor that accepts a CSS class on a link but not an ID
window.termsfeed_privacy_consent.v1.openPrivacyPreferences() Your own JavaScript, such as a click handler in a component

An ID or a class needs no script of your own. Add a trigger to a new site with Reopen Preferences.

Cause 1: The element ID does not match

The ID must read exactly open_privacy_preferences_element, in lower case and with underscores. Privacy Consent ignores every other value, such as open-privacy-preferences or cookie-settings. A theme or page builder that adds a prefix to the IDs you type breaks the match too.

The Console tab of Chrome DevTools answers this in one line. Run document.querySelector('#open_privacy_preferences_element') on the page. A result of null means no element carries the ID, and the Elements tab then shows what your link carries.

Set the ID, or the class where your editor has a CSS class field and no ID field. A working footer link looks like this example.

<a href="#" id="open_privacy_preferences_element">Privacy Preferences</a>

A trigger does nothing until Privacy Consent has started, and a click before that moment is not queued. Privacy Consent loads in the background after the page, so a click in the first moments does nothing. A page without the snippet, a script stopped by an error, and a consent banner the server does not serve leave every trigger without effect.

The Network tab and the Console tab show how far it got. Filter the Network tab for termsfeedtag and reload: a working page lists 7 requests with status 200. Then read the Console tab for these lines.

Console line What it means
[ee][478058ef] integration called `openPrivacyPreferences` before initialization! Your code called the method too early, and nothing opens
Cannot read properties of undefined (reading 'openPrivacyPreferences') Your code ran before the Privacy Consent files finished downloading
[ww][05cfcfb6] not serviceable The server reports the consent banner as not serviceable, so the script stops and no trigger works

Fix the line you found, then click the trigger again.

  1. Paste the snippet into the <head> of every page. Follow Install the Script for the details.
  2. Copy each [ee] or [ww] line from the console. Look up each one in the Console Error Reference, where the 05cfcfb6 warning has its own section.
  3. Call window.termsfeed_privacy_consent.v1.openPrivacyPreferences() only from a click handler, never while the page loads.

A trigger on a link with a real address opens the Preferences Center and then follows the link. Privacy Consent cancels the jump only for an empty href or href="#", on the trigger or on an element around it. An address such as /privacy-policy loads the new page, and the Preferences Center disappears with the old one.

Select the link in the Elements tab and read its href. Any value other than an empty string or # leaves the page.

Change the href of the trigger to #, or use a <button type="button">, and keep the link to your Privacy Policy as a separate link next to it.

Use the floating button when no trigger works on your site

The floating button opens the Preferences Center from every page, with no change to your site. Turn on "Use a sticky button to open the Privacy Preferences Center?" on the Appearance page of your consent banner. Every visitor then gets a "Privacy Preferences" button in a bottom corner of every page, including a visitor who has answered.

The setting reaches a browser that loaded your settings in the last hour within 1 hour. A chat widget in the same corner hides the button, so move it with the rule in Covers Content on Mobile.

How to verify that your trigger opens the Preferences Center

The check takes 4 steps and about 2 minutes, in a new private window on the page where visitors use the trigger.

  1. Open Chrome DevTools, select the Network tab, type termsfeedtag into the filter box, and load the page.
  2. Wait for the 7 requests to finish, then click your trigger. The Preferences Center opens, and the address bar keeps the same address.
  3. Open the Elements tab and search for id="termsfeed_pc1_preferences_center". The element sits at the end of the <body> while the Preferences Center is open.
  4. Switch a vendor category off, click Save Preferences, and type events.push into the Network filter box. A request with status 201 means the choice reached the consent log.