Pixels

Overview

Verizon Media DSP You can create and manage pixels that work across Verizon Media’s DSP and Native and Search platforms. After creating pixels you can add rules to them for tracking conversions and retargeting. A pixel is an organizational structure for a series of rules. One pixel can contain many rules.

Endpoint

/traffic/pixels

Use the following HTTP methods:

  • Use the GET method to view an existing pixel.

  • Use the POST method to create a new pixel.

Resources

Pixel

The Pixel object contains the following fields:

Field

Description

Data Type

Create

id

Specifies the pixel ID.

integer

N/A

name

Specifies the pixel name.

string

Required

accountId

Specifies the advertiser ID. To learn more, see Advertisers.

integer

Required

codes

Contains list of JS and HTML Pixel codes that can be pasted in advertiser’s website. To learn more, see Codes.

object

N/A

Codes

codes is a read-only object containing the following fields:

Field

Description

Data Type

type

Specifies the code type. Valid values include:

  • js - JavaScript code.

  • img - HTML image tag.

string

protocol

Valid values include:

  • http

  • https

string

instrumentationCode

Actual javascript code or HTML image tag.

string

Read Pixel

Read a specific pixel.

GET /traffic/pixels/{id}?accountId={accountId}

Parameters

Parameter

Parameter Type

Description

Data Type

Required

id

path

Specifies the pixel ID.

integer

Y

accountId

query

Specifies the advertiser ID.

integer

Y

Example Request URL

GET https://dspapi.admanagerplus.yahoo.com/traffic/pixels/10113138?accountId=2195444

Example Response

{
  "response": {
    "id": 10113138,
    "name": "Test Pixel 1",
    "accountId": 2195444,
    "codes": [
      {
        "instrumentationCode": "<script type=\"application/javascript\">(function(w,d,t,r,u){w[u]=w[u]||[];w[u].push({'projectId':'10000','properties':{'pixelId':'10113138'}});var s=d.createElement(t);s.src=r;s.async=true;s.onload=s.onreadystatechange=function(){var y,rs=this.readyState,c=w[u];if(rs&&rs!=\"complete\"&&rs!=\"loaded\"){return}try{y=YAHOO.ywa.I13N.fireBeacon;w[u]=[];w[u].push=function(p){y([p])};y(c)}catch(e){}};var scr=d.getElementsByTagName(t)[0],par=scr.parentNode;par.insertBefore(s,scr)})(window,document,\"script\",\"http://d.yimg.com/wi/ytc.js\",\"dotq\");</script>",
        "protocol": "http",
        "type": "js"
      },
      {
        "instrumentationCode": "<script type=\"application/javascript\">(function(w,d,t,r,u){w[u]=w[u]||[];w[u].push({'projectId':'10000','properties':{'pixelId':'10113138'}});var s=d.createElement(t);s.src=r;s.async=true;s.onload=s.onreadystatechange=function(){var y,rs=this.readyState,c=w[u];if(rs&&rs!=\"complete\"&&rs!=\"loaded\"){return}try{y=YAHOO.ywa.I13N.fireBeacon;w[u]=[];w[u].push=function(p){y([p])};y(c)}catch(e){}};var scr=d.getElementsByTagName(t)[0],par=scr.parentNode;par.insertBefore(s,scr)})(window,document,\"script\",\"https://s.yimg.com/wi/ytc.js\",\"dotq\");</script>",
        "protocol": "https",
        "type": "js"
      },
      {
        "instrumentationCode": "<img src=\"http://sp.analytics.yahoo.com/spp.pl?a=10000&.yp=10113138\"/>",
        "protocol": "http",
        "type": "img"
      },
      {
        "instrumentationCode": "<img src=\"https://sp.analytics.yahoo.com/spp.pl?a=10000&.yp=10113138\"/>",
        "protocol": "https",
        "type": "img"
      }
    ]
  },
  "errors": null,
  "timeStamp": "2020-06-30T20:05:20.944Z"
}

Read Pixels

Get a filtered list of pixels.

GET /traffic/pixels?accountId={accountId}&query={query}&page={page}&limit={limit}&sort={sort}&dir={dir}

Parameters

Parameter

Parameter Type

Description

Data Type

Required

accountId

query

Specifies the advertiser ID.

integer

Y

query

query

Specifies the search term.

Use URL encoding conventions (i.e. a space should be replaced with a + or %20).

string

N

page

query

Specifies the page number.

integer

N

limit

query

Specifies the total number of items to return. Maximum allowed value is 100.

integer

N

sort

query

Specifies the column to sort by.

string

N

dir

query

Specifies the sort direction. Allowed values:

  • ASC: data is sorted in ascending order.

  • DESC: data is sorted in decending order.

string

N

Example Request URL

GET https://dspapi.admanagerplus.yahoo.com/traffic/pixels?accountId=1356341&limit=1

Example Response

{
  "response": [
    {
      "id": 10113138,
      "name": "Test Pixels 1",
      "accountId": 2195444,
      "codes": [
        {
          "instrumentationCode": "<script type=\"application/javascript\">(function(w,d,t,r,u){w[u]=w[u]||[];w[u].push({'projectId':'10000','properties':{'pixelId':'10113138'}});var s=d.createElement(t);s.src=r;s.async=true;s.onload=s.onreadystatechange=function(){var y,rs=this.readyState,c=w[u];if(rs&&rs!=\"complete\"&&rs!=\"loaded\"){return}try{y=YAHOO.ywa.I13N.fireBeacon;w[u]=[];w[u].push=function(p){y([p])};y(c)}catch(e){}};var scr=d.getElementsByTagName(t)[0],par=scr.parentNode;par.insertBefore(s,scr)})(window,document,\"script\",\"http://d.yimg.com/wi/ytc.js\",\"dotq\");</script>",
          "protocol": "http",
          "type": "js"
        },
        {
          "instrumentationCode": "<script type=\"application/javascript\">(function(w,d,t,r,u){w[u]=w[u]||[];w[u].push({'projectId':'10000','properties':{'pixelId':'10113138'}});var s=d.createElement(t);s.src=r;s.async=true;s.onload=s.onreadystatechange=function(){var y,rs=this.readyState,c=w[u];if(rs&&rs!=\"complete\"&&rs!=\"loaded\"){return}try{y=YAHOO.ywa.I13N.fireBeacon;w[u]=[];w[u].push=function(p){y([p])};y(c)}catch(e){}};var scr=d.getElementsByTagName(t)[0],par=scr.parentNode;par.insertBefore(s,scr)})(window,document,\"script\",\"https://s.yimg.com/wi/ytc.js\",\"dotq\");</script>",
          "protocol": "https",
          "type": "js"
        },
        {
          "instrumentationCode": "<img src=\"http://sp.analytics.yahoo.com/spp.pl?a=10000&.yp=10113138\"/>",
          "protocol": "http",
          "type": "img"
        },
        {
          "instrumentationCode": "<img src=\"https://sp.analytics.yahoo.com/spp.pl?a=10000&.yp=10113138\"/>",
          "protocol": "https",
          "type": "img"
        }
      ]
    }
  ],
  "errors": null,
  "timeStamp": "2020-06-30T20:05:33.265Z"
}

Create Pixel

Create a new Pixel

POST /traffic/pixels

Example Request URL

POST https://dspapi.admanagerplus.yahoo.com/traffic/pixels

Example Request Body

{
  "name": "Test Pixel 1",
  "accountId": 1356341
}

Example Response

{
  "response": {
    "id": 6525181,
    "name": "Test Pixel 1",
    "accountId": 1356341
  },
  "errors": null,
  "timeStamp": "2017-06-29T02:49:30Z"
}

Delete Pixels

The DSP Traffic API does not support deletion of Pixels.