Tag integration V1
Starting with the live targeting API (decrepated)
Add this tag to you header or directly to the ad placement where you would like to access user segment authorized
Parse the JSON result to get the segments you need and push them into your adserver or SSP using key/value pairs.
Use callback to use the answer with a predefined javascript function (see Tag Response above)
function callback(result){
console.log(result); => callback here
}
var tag = document.createElement('script');
tag.src = 'https://partner-api.sddan.com/api/v1/public/user/partner/[PARTNER_ID]/segment?gdpr=[tcf_v2_gdpr_applies]&gdpr_consent=[tcf_v2_tcstring]&callback=callback';
tag.async = true;
tag.setAttribute('referrerpolicy','unsafe-url');
document.getElementsByTagName('body')[0].appendChild(tag);callback({"domain": "example.com","partner_id" : 1234,"user_segments" : [{"id":12, "name": "[Sirdata] Fashion"},{"id": 34, "name": "[Sirdata] Woman"}]})my_callback({"domain": "example.com","partner_id" : 1234,"user_segments" : [{"id":12, "name": "[Sirdata] Fashion"},{"id": 34, "name": "[Sirdata] Woman"}]}){
"domain": "example.com",
"partner_id": 1234,
"user_segments": [
{
"id": 12,
"name": "[Sirdata] Fashion"
},
{
"id": 34,
"name": "[Sirdata] Woman"
}
]
}Last updated