Use custom link/button instead of Cookie Shield

If you find that our shield blocks important elements of your website, you can use a custom link/button instead of the Cookie Shield to enable access to the cookie settings.

This feature is only available for customers on Cookie Business.

In the Widget Builder, select the "using a custom link/button" option, as shown:

Press save and exit.

To enable the custom link/button, you must add the data-openli="show-cookie-settings" attribute to your chosen HTML element. For example, to use a button element, you would add the following:

<button data-legalmonster="show-cookie-settings">Access your cookie settings</button>

When the user clicks or taps an element with that attribute, the cookie widget will show the settings page.

If the data-legalmonster="show-cookie-settings" attribute is not present on at least one element on the page, the cookie widget will revert to showing the shield, and log a warning in the browser console.


Below is an example of how you could use this functionality on your page:

The updated link would look something like this:

<a data-legalmonster="show-cookie-settings">Access your cookie settings</a>

Last updated