Web Implementation

To add Clickio Consent on your site, follow the steps below:

Step 1: Install сonsent code
  • Go to the Code tab of the Consent (GDPR)
  • Copy the header code and insert it as the very first script between the <head></head> on all pages of your website.
Step 2: Add ‘Change privacy settings’ link

To comply with GDPR, publishers must give users a way to change consent settings. A persistent link should be placed on your website, where users can easily find it and edit their consent preferences at any time. A click on this link will show the consent dialog again.

  • Copy the link code, it also can be found in the Code tab of the Consent (GDPR):
<a href="#" onclick="if(window.__lxG__consent__!==undefined&amp;&amp;window.__lxG__consent__.getState()!==null){window.__lxG__consent__.showConsent()} else {alert('This function only for users from European Economic Area (EEA)')}; return false">Change privacy settings</a>
  • If you want to display the 'Change privacy settings' link only when the Consent dialog is available, use this code instead:
<a href="#" id="__lxG__consent__showConsent" style="display: none;" onclick="if(window.__lxG__consent__!==undefined&amp;&amp;window.__lxG__consent__.getState()!==null){window.__lxG__consent__.showConsent()}; return false">Change privacy settings</a>
<script type="text/clickiocmp" async>
    if(window.__lxG__consent__.getState() === 1) {
        document.querySelector('#__lxG__consent__showConsent').style.display = '';
    }
</script>
  • The text ‘Change privacy settings’ can be edited and translated into your site’s language.
  • Place the code either on all pages of your website (for example, in footer or header) or inside your Privacy/Cookie policy.
  • Additionally, you can use optional parameters to directly open specific tabs in the consent dialog:

    • showConsent() to open initial screen.

    • showConsent('options-purposes') to open the "Purposes" tab.
    • showConsent('options-li') to open the "Legitimate Interest" tab.
    • showConsent('options-vendors') to open the "Manage Partners" tab.
  • If you need to force the display of the consent dialog for testing purposes, you can add the parameter ?showConsent=1 to the page URL. Please be aware that this will only affect users in the European Economic Area (EEA).
  • To forcibly disable the consent dialog, you can append ?showConsent=no to the page URL. For instance, this can be applied to the Privacy Policy URL to prevent the dialog from appearing.
Step 3 (optional): Install TCF API stub code

In case of using non-Clickio ads mediation/monetization solutions please refer to this article.