CMP script tag integration (Clickio specific)

By default, all publishers are encouraged to use the standard TCF v2 API (__tcfapi) to get end-user consent information, such as per-vendor settings, specific purposes consent, etc. However, Clickio Consent also offers simplified method for publishers' convenience.

By default, __tcfapi is not available for non-EEA users for optimization reasons. If you choose to utilize it or want to have it anyway, please contact our support.

 

Clickio simplified integration

To pause script tags execution before user consent is obtained, we offer a simplified solution, which also allows additional consent data checks before the script is executed

This solution is fine for most cases, but if you can integrate using TCF or Clickio APIs, it is better to use those approaches, as those provide more granular control over the process and consent data

If you plan to pause script tags with src attribute, consider preloading those with:
<link rel="preload" href="%scipr_src_here%" as="script" />
to minimize delays when script is executed

Only script tags with attribute async are processed by the Consent tool logic, as the code itself is executed asynchronously, please double-check to prevent erroneous behaviour (scripts without attribute will not be executed, execution logic may change on async script execution)

 
Pausing script tag before user choice is obtained

For example you have the following code on your site (works the same way for tags with src attribute):

<script type="text/javascript">
console.log('user choice obtained');
</script>

1. Add async attribute to the tag

2. Set tag type attribute to text/clickiocmp

Resulting code:

<script async type="text/clickiocmp">
console.log('user choice obtained');
</script>

This code will be executed automatically when the user choice is obtained.

 

To fine-control script execution conditions we have provided several additional attributes:

The following attributes can be combined and the check is performed with AND condition.

 
clickio-cmp-purpose-consent

Can be an integer or a comma separated list of integers of IDs of IAB specified purposes for which consent is mandatory for script execution.

Example:

<script async type="text/clickiocmp" clickio-cmp-purpose-consent="1">
console.log('user consent for purpose 1 obtained');
</script>

 

clickio-cmp-purpose-li

Can be an integer or a comma separated list of integers of IDs of IAB specified purposes for which legitimate interest approval is mandatory for script execution.

Example:

<script async type="text/clickiocmp" clickio-cmp-purpose-li="2,7,9,10">
console.log('user approved legitimate interest for purposes 2, 7, 9 and 10');
</script>

 

clickio-cmp-vendor-consent

Can be an integer or a comma separated list of integers of IDs of IAB vendors for which consent is mandatory for script execution.

Example:

<script async type="text/clickiocmp" clickio-cmp-vendor-consent="755">
console.log('user consent for Google Inc. (id:755) obtained');
</script>

 

clickio-cmp-vendor-li

Can be an integer or a comma separated list of integers of IDs of IAB vendors for which legitimate interest approval is mandatory for script execution.

Example:

<script async type="text/clickiocmp" clickio-cmp-vendor-li="755">
console.log('user approved legitimate interest for Google Inc. (id:755)');
</script>