If you are using the IAB TCF template, then by default when a visitor chooses "decline all" they will be opted out of legitimate interests. In some cases, it is beneficial to change this behaviour.

In order to ensure that legitimate interests are set to TRUE when a user selects "decline all", you will need to make a small adjustment to the configuration file for TCF in the <head> of your site by adding the following line:

enableAllPurposesLegitimateInterestsOnDeclineAll: true

The full script should look like so:

<script type="text/javascript"> 
window.cookieInformationCustomConfig = {
IABTCF2Framework: {
enableAllPurposesLegitimateInterestsOnDeclineAll: true

How do I know it's working correctly?

You'll be able to see Legitimate Interests is still configured on the pop-up itself.

Visit your site and on the pop-up click "View purpose" (formål).

Select one of the drop down menu items.

Scroll until you get to a toggle (which is active).

Decline all cookies, then re-open the pop-up. Repeat the same steps with the pop-up and you should see that the toggle is still active, even after cookies have been declined.

Did this answer your question?