IAB frameworks

Didomi is a registered CMP (ID 7) with the IAB Europe. We fully support the CMP API and your vendors will automatically use the __tcfapi function that we expose to collect user consent.

For this integration to behave properly, make sure that you include the IAB CMP stub at the top of your page:

(function(){function r(e){if(!window.frames[e]){if(document.body&&document.body.firstChild){var t=document.body;var n=document.createElement("iframe");n.style.display="none";n.name=e;n.title=e;t.insertBefore(n,t.firstChild)}else{setTimeout(function(){r(e)},5)}}}function e(n,o,a,c,d){function e(e,t,n,r){if(typeof n!=="function"){return}if(!window[o]){window[o]=[]}var i=false;if(d){i=d(e,r,n)}if(!i){window[o].push({command:e,version:t,callback:n,parameter:r})}}e.stub=true;e.stubVersion=2;function t(r){if(!window[n]||window[n].stub!==true){return}if(!r.data){return}var i=typeof r.data==="string";var e;try{e=i?JSON.parse(r.data):r.data}catch(t){return}if(e[a]){var o=e[a];window[n](o.command,o.version,function(e,t){var n={};n[c]={returnValue:e,success:t,callId:o.callId};if(r.source){r.source.postMessage(i?JSON.stringify(n):n,"*")}},o.parameter)}}if(typeof window[n]!=="function"){window[n]=e;if(window.addEventListener){window.addEventListener("message",t,false)}else{window.attachEvent("onmessage",t)}}}e("__tcfapi","__tcfapiBuffer","__tcfapiCall","__tcfapiReturn");r("__tcfapiLocator");(function(e){var t=document.createElement("link");t.rel="preconnect";t.as="script";var n=document.createElement("link");n.rel="dns-prefetch";n.as="script";var r=document.createElement("script");r.id="spcloader";r.type="text/javascript";r["async"]=true;r.charset="utf-8";var i="{{SDK-URL}}"+e+"/loader.js?target="+document.location.hostname;if(window.didomiConfig&&window.didomiConfig.user){var o=window.didomiConfig.user;var a=o.country;var c=o.region;if(a){i=i+"&country="+a;if(c){i=i+"&region="+c}}}t.href="{{SDK-URL}}";n.href="{{SDK-URL}}";r.src=i;var d=document.getElementsByTagName("script")[0];d.parentNode.insertBefore(t,d);d.parentNode.insertBefore(n,d);d.parentNode.insertBefore(r,d)})("{{Your-API-Key}}")})();
circle-info

This stub is automatically added to your Embed code available in the Didomi Consolearrow-up-right.

For the stub to behave properly, it should be added at the top of the <head> section, before any other script. Improperly placing the stub on your pages will reduce the effective consent rate seen by your IAB vendors and can impact your ad revenue negatively.

​Read more in the IAB documentationarrow-up-right

Global Privacy Platform (GPP)

The Global Privacy Platform (GPP) arrow-up-rightstring encapsulates user privacy preferences across multiple jurisdictions and frameworks. To learn more about Didomi's GPP integration read our help center documentationarrow-up-right.

By decoding the GPP string, you will have access to detailed information about user preferences across regulations, including:

  • Applicable strings (e.g. TCF, USCA, USNAT, etc.)

  • User's preferences related to the applicable data processing per regulation.

Similar to the TCF framework, ensure that the GPP stubarrow-up-right is included at the top of your webpage. This stub is automatically added to your Embed code available in the Didomi Consolearrow-up-right.

Fetching GPP string

Here is an example of GPP string: DBABBg~BqoIAAKU.QA

Decoding GPP string

Decode and interpret the GPP string using the IAB GPP Decoderarrow-up-right.

Last updated