Sirdata API
Semantic APISirdata CMP - APIAbout Sirdata
  • Sirdata API
  • Overview
    • API Access
    • Sandbox
    • API Updates
  • Authentification
    • Get Token
  • Taxonomy
    • Sirdata Taxonomy
    • IAB Taxonomy
    • 3rd Party Taxonomy
  • A.D.S API
    • About A.D.S
    • Tag integration V1
    • Tag integration V2
    • Test method
    • Segment Access
  • Notification API
    • About Notification API
    • Audience
    • Campaign
    • Webhook endpoint
  • 😎Customer API
    • About Customer API
    • Create storage
    • Create Filter (counting)
    • Create order
    • Segment list
  • Semantic API
  • Sirdata CMP
  • About Sirdata
  • Sirdata API SLA
Powered by GitBook
On this page

Was this helpful?

  1. A.D.S API

Tag integration V1

Starting with the live targeting API (decrepated)

This API is decrepated, please consider using the Tag integration V2

Add this tag to you header or directly to the ad placement where you would like to access user segment authorized

THIS TAG MAY ACCESS AN EXISTING COOKIE : DO NOT CALL IT UNLESS YOU PREVIOUSLY COLLECTED A VALID CONSENT TO DO SO WHENEVER REQUESTED BY LOCAL LAW

In UE, the UK, Iceland, Liechtenstein and Norway, unless specifically and by written authorized not to, do not call the tag if you didn't previously collected a valid consent for Purposes 1 & 3 and Vendor 53 under the IAB Europe Transparency & Consent Framework, and add the mandatory gdpr=[gdpr_applies]&gdpr_consent=[tc_string] parameters in the URL.

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);

(mandatory) [PARTNER_ID] : numerical value - is given by your contact at Sirdata during the API Access process

(mandatory for EEA/UK users) gdpr : TCF V2 gdpr_applies parameter

(mandatory for EEA/UK users) gdpr_consent : TCF V2 TC String

(optional) callback : callback function name can be change

Tag response will call the default “callback” with user segments if requested in the call without function name (...&callback)

callback({"domain": "example.com","partner_id" : 1234,"user_segments" : [{"id":12, "name": "[Sirdata] Fashion"},{"id": 34, "name": "[Sirdata] Woman"}]})

Tag response will call your function name in the resquest (...&callback=my_callback)

my_callback({"domain": "example.com","partner_id" : 1234,"user_segments" : [{"id":12, "name": "[Sirdata] Fashion"},{"id": 34, "name": "[Sirdata] Woman"}]})

JSON Object Format if no callback function is requested

{
  "domain": "example.com",
  "partner_id": 1234,
  "user_segments": [
    {
      "id": 12,
      "name": "[Sirdata] Fashion"
    },
    {
      "id": 34,
      "name": "[Sirdata] Woman"
    }
  ]
}

PLEASE REMBER TO HAVE YOUR DOMAIN WHITELISTED, OTHERWIZE THE TAG WILL GET NOW ANSWER

PreviousAbout A.D.SNextTag integration V2

Last updated 3 years ago

Was this helpful?