"Cookie Preferences" link
A link in the footer reopens the preferences panel, so the visitor can change their choice at any time. The link calls window.Avacy.showPreferenceCenter().
The v2 banner uses a different call, which the current banner does not recognise. See Preferences link (v2). If you don't know which banner your site uses, read Which banner your site is using.
Prerequisites
Before you start, check that:
- the banner is installed on the page. See HTML snippet;
- you can edit the page template or the footer.
Steps
-
Add the link to the footer, hidden until the banner has loaded.
<a href="#" id="avacy-prefs-link" hidden>Cookie Preferences</a>For an English-language site use the text
Cookie Preferences, the same one the banner uses. -
Right after the link, add the script that shows the link when the banner is ready and opens the panel on click.
<script>(function () {var link = document.getElementById('avacy-prefs-link');function show() {link.hidden = false;}// The banner may already be ready, or not.if (window.Avacy && window.Avacy.getConsent() && window.Avacy.getConsent().ready) {show();} else {document.addEventListener('avacy:ready', show, { once: true });}link.addEventListener('click', function (event) {event.preventDefault();window.Avacy.showPreferenceCenter();});})();</script> -
Save the page and reload it.
Why the link starts hidden
The banner loads asynchronously and creates window.Avacy only at startup. Before that, window.Avacy.showPreferenceCenter() throws an error, and the banner does not queue calls that arrive too early.
The script in step 2 shows the link right away if the banner is already ready, otherwise it waits for avacy:ready. It checks getConsent() first because a listener registered after the event misses it. More events in Banner events.
Opening the panel on a section
showPreferenceCenter accepts an optional argument: an options object.
window.Avacy.showPreferenceCenter(options?: { section?: string }): Promise<void>
| Option | What it does |
|---|---|
section | Opens the panel on a section, given by type ('vendor') or by exact id ('tcf::vendor'). If the section does not exist, the panel opens on the first item. |
The panel always opens on top of the page.
Opening on the vendor list.
window.Avacy.showPreferenceCenter({ section: 'vendor' });
The function returns a Promise. The banner emits the avacy:cpc-opened event when the panel opens and avacy:cpc-closed when it closes.
Check
- Open the page. The link appears once the banner is ready.
- Click Cookie Preferences. The panel opens.
Common problems
The most frequent problems:
- The click does nothing and the console shows
Cannot read properties of undefined: the banner has not loaded yet or the page does not have the snippet. Use the script from step 2; - The link is covered by the banner: the first-layer banner overlaps the footer until the visitor chooses. The link is meant for after the choice;
- The preferences button (the shield) does not appear: in the dashboard the option is in Appearance > Banner > Preferences area > Show the button on your web space. With the option off, the footer link is the only way to reopen the panel.
Last updated: 10/11/2026.