Adding a "Privacy Control Center" Button to Programmatically Open the Cookie Banner

Modified on Tue, 27 Feb 2024 at 12:34 PM

Adhering to regulations, users should have the option to modify their cookie preferences. While many websites opt for a widget, if you choose not to use one, we recommend adding a link in the site footer to open the cookie banner. This link can be labeled "Privacy Control Center."


If you use IAB, you must give this option to your visitors! Check at the end of the article how to do it.



How can I do this?

By adding a button or link with an onClick that will activate the illow.showWidget() method;



It should look like this:


<a href="#" onclick="illow.showWidget()" class="bannerLink">Privacy Control Center</a>



Now, you have a link or button on your page that will display the banner when you need to, without showing the cookie widget permanently!

Keep in mind that in some cases, depending on the structure of your site or how it's set up, some basic aspects may vary. A clear example of this would be in the case of a site using React. To use the method in your component, you should first access it through the window, as illustrated in the following image of this case.


Hiding the circle widget with IAB


As previously discussed, you can proceed with the implementation of the feature but it is important to provide the users with the option to reopen the banner. If you wish to unlock this feature, please create a support ticket to confirm that you will add a button for Privacy Control Center in the footer of your website. Once this is done, the feature will be unlocked and you can proceed with the implementation.


Why thisThe IAB banner states how to edit your choices, mentioning that it can be done through the widget. We will revise this and edit the text to indicate that it will be located in the footer, under the phrase "Privacy Control Center".

To finalize the correct integration, please contact our support team.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article