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:

window.gdprAppliesGlobally=true;(function(){function n(e){if(!window.frames[e]){if(document.body&&document.body.firstChild){var t=document.body;var a=document.createElement("iframe");a.style.display="none";a.name=e;a.title=e;t.insertBefore(a,t.firstChild)}else{setTimeout(function(){n(e)},5)}}}function e(a,r,o,s,c){function e(e,t,a,n){if(typeof a!=="function"){return}if(!window[r]){window[r]=[]}var i=false;if(c){i=c(e,t,a)}if(!i){window[r].push({command:e,parameter:t,callback:a,version:n})}}e.stub=true;function t(n){if(!window[a]||window[a].stub!==true){return}if(!n.data){return}var i=typeof n.data==="string";var e;try{e=i?JSON.parse(n.data):n.data}catch(t){return}if(e[o]){var r=e[o];window[a](r.command,r.parameter,function(e,t){var a={};a[s]={returnValue:e,success:t,callId:r.callId};n.source.postMessage(i?JSON.stringify(a):a,"*")},r.version)}}if(typeof window[a]!=="function"){window[a]=e;if(window.addEventListener){window.addEventListener("message",t,false)}else{window.attachEvent("onmessage",t)}}}e("__uspapi","__uspapiBuffer","__uspapiCall","__uspapiReturn");n("__uspapiLocator");e("__tcfapi","__tcfapiBuffer","__tcfapiCall","__tcfapiReturn");n("__tcfapiLocator");(function(e){var t=document.createElement("script");t.id="spcloader";t.type="text/javascript";t.async=true;t.src="https://sdk.privacy-center.org/"+e+"/loader.js?target="+document.location.hostname;t.charset="utf-8";var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(t,a)})("{{Your-API-Key}}")})();

This stub is automatically added to your Embed code available in the Didomi Console. 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 documentation

IAB CCPA Compliance Framework

The Didomi consent notices are compliant with the specifications from the IAB CCPA Compliance Framework. We fully support the USP API and your vendors will automatically use the __uspapi function that we expose to collect the "Do Not Sell" status of the user.

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

(function(){function i(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(){i(e)},5)}}}function e(n,a,r,e,o){function t(e,t,n){if(typeof n!=="function"){return}if(!window[a]){window[a]=[]}var i=false;if(o){i=o(e,t,n)}if(!i){window[a].push({command:e,parameter:t,callback:n})}}t.stub=true;function i(i){if(!window[n]||window[n].stub!==true){return}if(!i.data){return}var a=typeof i.data==="string";var e;try{e=a?JSON.parse(i.data):i.data}catch(t){return}if(e[r]){var o=e[r];window[n](o.command,o.parameter,function(e,t){var n={};n.postMessageReturn={returnValue:e,success:t,callId:o.callId};i.source.postMessage(a?JSON.stringify(n):n,"*")})}}if(typeof window[n]!=="function"){window[n]=t;if(window.addEventListener){window.addEventListener("message",i,false)}else{window.attachEvent("onmessage",i)}}}e("__uspapi","__uspapiBuffer","__uspapiCall","__uspapiReturn");i("__uspapiLocator")})();

This stub is not automatically added to your Embed code available in the Didomi Console. 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 prevent IAB vendors from correctly collecting the user Do Not Sale status.

Read more in the IAB documentation

Last updated