Retailer API

Ad Request Parameters

There is an option to set up additional parameters to the Ad Request such as: userKeywords, contentKeywords, custonerID, cat, filters, group, currency, customParam, yob, gender:

<script type="text/javascript">
var dioParams = {
    adsSrvDomain: '', //mandatory
    cdnDomain: '', //mandatory
    userKeywords:  '', //optional, comma separated
    contentKeywords:  '', //optional, comma separated
    customerID: '', //optional, single value
    cat: '', //optional, comma separated
    filters:  '', //optional, comma separated
    group:  '', //optional, comma separated
    currency:  '', //optional, single value
    customParam:  '', //optional, JSON
    yob:  '', //optional, year of birth, comma separated
    gender:  '', //optional, JSON

Get Ad Response Parameters

To get ad load and impression tracking notifications define the callback functions onLoad and onImpression for parameter handlers within the Config Script.

handlers: { //optional, JSON  
  onImpression: adData  => {}, //optional, function  
  onLoad: adData  => {}, //optional, function

The argument of these callbacks is adData object that contains properties such as placement, ecpm, productCode, retailerTaxonomy, globalIdentifier, customParams, productName, productPrice, cid (campaignID), crid (creativeID)

adData: {
    placement: '5435',  
    ecpm: 7.5, 
    productCode: 'A574hh-84HG', 
    retailerTaxonomy: '#6288390', 
    globalIdentifier: 'YB-5546474', 
    customParams: undefined, productBrand: "Adidas", 
    productName: "FORUM MID SHOES",  
    productPrice: "$99,9”,
    cid: "RT578991",
    crid: "RT578991-874}

Custom Action Setup

To set up custom action on click event define callback function onClick for parameter handlers within the Config Script. The argument of this callback is the clicked element.  The callback will work for all elements that are defined in the clickableObject (for Shopable Video: adContainer, productImage, productVideo, button, productName, productRate, productInfo, productReviews, adContent). If it needs to be a default behaviour on click event for some element, filter it and return true from callback: 

var dioParams = {
. . .
handlers: {
    onClick: target => {
        if (target.nodeName === 'BUTTON') {
            return true
        console.log('***click element - ', target)

In order to support passback define the passback script as a value for parameter passbackTag within the Config Script  (the script should be escaped):

passbackTag :  '', //optional, string (should be escaped)

Still have Questions?

Contact Us