Tag integration V2

Live Targeting API (new API)

circle-info

Should you want to use our API for user data and/or contextual with Prebid, please consider using our official Prebid Real Time Data Submodulearrow-up-right

Add this tag to you header or directly to the ad placement where you would like to access user segments cookies & consent based user-centric segments, cookieless and/or contextual categories.

circle-check
circle-exclamation

Use this script to get user-centric segments and contextual categories and use them in the callback function :

function sddanCallback(result){
   //Do stuff here e.g. load adserver/ssp with key/value data in result
   console.log(result);
   console.log(JSON.stringify(result.segments));
   console.log(JSON.stringify(result.contextual_categories));
   console.log(JSON.stringify(result.shared_taxonomy));
}

var sddanPid = 1; //USE 1 FOR TESTS, GET YOUR OWN ID
var sddanKeyId = 1; //USE 1 FOR TESTS, GET YOUR OWN ID

var sddanTag = document.createElement('script');
var sddanUrl;
try { sddanUrl = '&url='+encodeURIComponent(window.top.location.href); } catch (e) {}
sddanTag.src = 'https://kvt.cookieless-data.com/api/v1/public/p/'+sddanPid+'/d/'+sddanKeyId+'/s?callback=sddanCallback'+sddanUrl;
sddanTag.async = true;
sddanTag.setAttribute('referrerpolicy','unsafe-url');
document.getElementsByTagName('body')[0].appendChild(sddanTag);

gdpr and gdpr_consent are collected automatically, but you can earn precious milliseconds by sending them directly on the relevant endpoint like that :

Parameter

Value

[PARTNER_ID]

numerical value - is given by your contact at Sirdata during the API Access process (e.g. sddanPid in the example above) (mandatory)

[KEY_ID]

numerical value - is given by your contact at Sirdata during the API Access process (e.g. sddanKeyId in the example above) (mandatory)

gdpr

TCF V2 gdpr_applies parameterarrow-up-right (mandatory for EEA/UK users)

gdpr_consent

TCF V2 TC Stringarrow-up-right (mandatory for EEA/UK users)

callback

callback function name can be change (mandatory)

triangle-exclamation

Whenever you want to work accordingly to the SDA specification, please refer to the official segtax ID taxonomiesarrow-up-right.

Last updated