Add this tag to you header bidding or directly to the ad placement where you would like to access user segment authorized
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?callback=callback’;tag.async = true;document.getElementsByTagName('body')[0].appendChild(tag);
Please note that your [PARTNER_ID] - numerical value - is given by your contact at Sirdata during the API Access process
(optional) callback callback function name can be change
Tag response will call your callback function (default “callback”) with user segments
callback({"domain": "example.com","partner_id" : 1234,"user_segments" : [{"id":12, "name": "[Sirdata] Fashion"},{"id": 34, "name": "[Sirdata] Woman"}]})
E.g JSON Object Format
{"domain": "example.com","partner_id": 1234,"user_segments": [{"id": 12,"name": "[Sirdata] Fashion"},{"id": 34,"name": "[Sirdata] Woman"}]}