Native Response Object

Note

Fields marked with an asterisk (*) are optional.

Native Object Properties

Value

Type

Description

assets

array of objects

List of native ad assets.

link

object

The Native Link Object. This is the default link object for the ad. Individual assets can also have a link object which applies if the asset is activated (clicked). If the asset has no link object, the parent link object applies.

ext*

object

Native Ext Object

ver*

string

Version of the Native Markup version in use, for example, "1".

privacy*

string

If support was indicated in the request, return the URL of a page informing the user about the buyer’s targeting activity.

eventtrackers*

array of objects

Specifies what type of event tracking is supported, see Event Tracker Response Object

imptrackers **

array of strings

Deprecated since version 5.3: replaced by the eventtrackers field

An array of impression tracking URLs, expected to return a 1x1 image or 204 response, for example, ["http://adserver.com/native?impid=102"]. This URL can contain the win_price macro.

jstracker*

string

Deprecated since version 5.3: replaced by the eventtrackers field

Optional JavaScript impression tracker. This should be valid HTML with JavaScript already wrapped in <script> tags. It will be executed at impression time where it can be supported.

Note: Currently the only Supplier that supports this field is TripleLift.

Note

(**) imptrackers array should be used with following constraints:

For Rubicon, only one element is guaranteed to be triggered. Place the trackers in the order of importance, otherwise this array is optional and may not be present in each response.

Native Assets Object

Note

  • (*) There may be exactly one of the fields marked with asterisk in one asset object.

  • (**) The link object is optional and may not be present in each response.

Native Asset Object Properties

Value

Type

Description

id

integer

A unique asset ID, must match one of the asset IDs in the bid request, for example, 1.

required*

integer

Set to 1 if the asset is required (bidder requires it to be displayed), default is 0, for example, 1.

title*

object

Title object for a title asset, see, Native Assets Title Object.

img*

object

Image object for an image asset, see, Native Assets Image Object.

video*

object

Video object for a video asset, see, Native Asset Video Object.

data*

object

Data object for a data asset, see, Native Asset Data Object.

link **

object

Link object for a call to action.

  • The link object applies if the asset item is activated (clicked).

  • If there is no link object on the asset, the parent link object on the bid response applies. See Native Link Object.

Native Assets Title Object

Native Asset Title Object Properties

Value

Type

Description

text*

string

The text associated with the title element. "Our product is the best!"

Native Assets Image Object

Native Asset Image Object Properties

Value

Type

Description

url

string

(Required) URL of the image asset, for example, "http://adserver.com/image?impid=102".

h

integer

(Recommended) Height of the image in pixels, for example, 250.

w

integer

(Recommended) Width of the image in pixels, for example, 300.

Important

If the Supplier specifies the exact w/h or the wmin/hmin in the bid request, the bid response must contain the w/h values and these fields become required, see the relevant request field for details Native Asset Image Object.

Native Asset Video Object

Native Asset Video Object Properties

Value

Type

Description

vasttag

string

Vast XML, use the following example to format your VAST XML response. See the VAST Tag example below, Video Asset vasttag Example.

ext*

object

Native Asset Video Object Extension

Native Asset Video Object Extension

Native Asset Video Object Extension Properties

Value

Type

Description

playbackmethod*

integer

Desired video playback method

Native Asset Data Object

Native Asset Data Object Properties

Value

Type

Description

value

string

The formatted string of data to be displayed. Can contain a formatted value such as “5 stars” or “$10” or “3.4 stars out of 5”.

Native Response Example

{
   "seatbid":[
      {
         "bid":[
            {
               "ext":{
                  "native":{
                     "ver":"1.2",
                     "eventtrackers":[
                        {
                           "event":1,
                           "method":2,
                           "url":"http://www.mytracker.com/tracker.js"
                        },
                        {
                           "event":2,
                           "method":1,
                           "url":"http://www.example.com/tracker.php"
                        }
                     ],
                     "privacy":"privacy-example.com",
                     "link":{
                        "url":"http://adserver.com/click?impid=102"
                     },
                     "assets":[
                        {
                           "id":1,
                           "video":{
                              "ext":{
                                 "playbackmethod":1
                              }
                           },
                           "required":1,
                           "title":{
                              "text":"A test Native Ad"
                           }
                        }
                     ]
                  }
               }
            }
         ]
      }
   ]
}

Video Asset vasttag Example

<?xml version="1.0" encoding="UTF-8"?>
<VAST version="2.0">
   <Ad id="12345">
      <InLine>
         <AdSystem version="1.0">SpotXchange</AdSystem>
         <AdTitle><![CDATA[Sample VAST]]></AdTitle>
         <Impression>http://sample.com</Impression>
         <Description><![CDATA[A sample VAST feed]]></Description>
         <Creatives>
            <Creative sequence="1" id="1">
               <Linear>
                  <Duration>00:00:30</Duration>
                  <TrackingEvents />
                  <VideoClicks>
                     <ClickThrough><![CDATA[http://sample.com/openrt btest]]>
                     </ClickThrough>
                  </VideoClicks>
                  <MediaFiles>
                     <MediaFile delivery="progressive" bitrate="256"
                     width="640" height="480" type="video/mp4">
                     <![CDATA[http://sample.com/video.mp4]]>
                     </MediaFile>
                  </MediaFiles>
               </Linear>
            </Creative>
         </Creatives>
      </InLine>
   </Ad>
</VAST>

Event Tracker Response Object

The event trackers response is an array of objects and specifies the types of events the bidder wishes to track and the URLs/information to track them. Buyers must only respond with methods indicated as available in the request.

Note

Most javascript trackers expect to be loaded at impression time, so it’s not generally recommended for the Buyer to respond with javascript trackers on other events, but the appropriateness of this is up to each Buyer.

Event Tracker Response Object

Value

Type

Description

event

integer

Type of event to track, see the Event Tracking Types table

method

integer

Type of method to track, see the Event Tracking Methods table

url*

string

The URL of the impage or js. Required for image or js, optional for custom. This value can contain the win_price macro.

customdata*

object

containing key:value pairs - To be agreed individually with the exchange, an array of key:value objects for custom tracking, for example the account number of the DSP with a tracking company. IE {“accountnumber”:”123”}.

ext*

object

This object is a placeholder that may contain custom JSON agreed to by the parties to support flexibility beyond the standard defined in this specification

Event Tracker Response Example

{
   "eventtrackers":[
      {
         "event":1,
         "method":2,
         "url":"http://www.mytracker.com/tracker.js"
      },
      {
         "event":2,
         "method":1,
         "url":"http://www.example.com/tracker.php"
      }
   ]
}