In more recent template updates, categories that contain no cookies do not appear. Visitors need only consent to active cookie categories.

Suppose you would like to have all categories displayed on your pop-up. In that case, you need to remove the IF statement controlling this located in the JavaScript of the consent pop-up.

Note: If the scanner could not scan your website, all of the cookie categories will not show since there are no cookies in any of the categories. And the pop-up might appear to have missing toggles.

You can first see the Overlay V2 pop-up template with all cookie categories shown in the example below. Then, the other one with empty cookie categories is autohidden from the pop-up text (1) and the toggles (2).

Show all cookie categories

First, let's show all cookie categories in the pop-up text.

  1. Go to the consent solution that contains the pop-up you wish to edit.

  2. Click on the Pop-up tab -> "Pop-up text" field

  3. Replace <ol class="coi-purpose-list"></ol> with <ol><li>Funktionalitet</li><li>Statistik</li><li>Marketing</li></ol>

Then, we need to show all toggles.

Start by going to the consent solution that contains the pop-up you wish to edit. From there click on the Pop-up tab - Advanced Settings - HTML field (the first of the three boxes).

Scroll down the field until you see the following line:

{{#each cookie_categories}}

Directly below, you should see:

{{#if this.cookie_type_count}}

Remove the line, and then continue further down until you find the end of the IF statement:

{{/if}} 
{{/each}}

Remove the {{/if}}

This needs to be done on both instances of #{{each cookie_categories}}.

Once you have made your changes, remember to click "Save and Publish" so they take effect.

Autohide empty cookie categories

Please use this guide to remove a category that you do not have any cookies in.

First, let's hide all empty cookie categories in the "Pop-up text".

  1. Go to the consent solution that contains the pop-up you wish to edit.

  2. Click on the Pop-up tab -> "Pop-up text" field

  3. Replace <ol><li>Funktionalitet</li><li>Statistik</li><li>Marketing</li></ol> with <ol class="coi-purpose-list"></ol>

Then, we need to hide the toggles.

These changes will be made in the Consent Solution - Pop-up - Advanced Settings - HTML.

To remove categories that do not contain any cookies, you need to add this code snippet:

#{{#if this.cookie_type_count}}

right after the

#{{#each cookie_categories}}

And close the if statement with

#{{/if}}

right before

#{{/each}}

This should be done on both instances of #{{#each cookie_categories}}.

Did this answer your question?