How to resurface the settings dialog and personal data tab

CookieHub provides options for end users to revisit their cookie settings or personal data preferences after making an initial consent choice. By default, this is done using the settings icon shown in the lower left or right corner of your site.


Hiding the settings icon

If the icon does not fit your website design or is distracting, you can hide it in the CookieHub portal:

  1. Log in to the CookieHub dashboard.
  2. Select your domain.
  3. Go to Customize → Icon.
  4. Enable the option to hide the icon.

Compliance note

Under GDPR and similar laws, users must still be able to withdraw consent after the initial choice. If you hide the icon, you need to provide an alternative way to resurface the settings dialog on your site.


Resurfacing the settings dialog

You can resurface the cookie settings dialog in two ways:

1. Using an HTML class

Add the class ch2-open-settings-btn to any link or button on your site:

Button example:

<button class="ch2-open-settings-btn">Open Settings</button>

Link example:

<a href="#" class="ch2-open-settings-btn">Open Settings</a>

2. Using the JavaScript API

You can open the settings dialog programmatically:

window.cookiehub.openSettings();

Resurfacing the personal data tab

Available in version 2.7 and later, the Personal Data tab appears in the settings dialog if you have enabled the IAB US Privacy or IAB GPP framework (for CCPA/CPRA compliance).

Add a button or link

Use the class ch2-open-personal-data-btn

Button example:

<button class="ch2-open-personal-data-btn">Do not sell or share my personal information</button>

Link example:

<a href="#" class="ch2-open-personal-data-btn">Do not sell or share my personal information</a>

Using the JavaScript API

You can open the Personal Data tab directly:

window.cookiehub.openPersonalData();

Conditional display

If the Personal Data tab is not available (for example, because the user is outside CCPA/CPRA regions), buttons or links with the ch2-open-personal-data-btn class will be hidden automatically.