Pixels¶
Overview¶
Yahoo DSP can create and manage pixels that work across the Yahoo DSP and Native and Search platforms. After creating pixels you can add beacons to them for tracking conversions and retargeting. A pixel is an organizational structure for a series of rules. One pixel can contain many rules.
For more information about beacons and how they’re used for tracking conversions and retargeting, refer to Beacons.
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 |
---|---|---|---|
|
Specifies the pixel ID. |
|
N/A |
|
Specifies the pixel name. |
|
Required |
|
Specifies the advertiser ID. To learn more, refer to Advertisers. |
|
Required |
|
Contains list of JS and HTML Pixel codes that can be pasted in advertiser’s website. To learn more, refer to Codes. |
|
N/A |
Codes¶
codes
is a read-only object containing the following fields:
Field |
Description |
Data Type |
---|---|---|
|
Specifies the code type. Valid values include:
|
|
|
Valid values include:
|
|
|
Actual javascript code or HTML image tag. |
|
Read Pixel¶
Read a specific pixel.
GET /traffic/pixels/{id}?accountId={accountId}
Parameters¶
Parameter |
Parameter Type |
Description |
Data Type |
Required |
---|---|---|---|---|
|
path |
Specifies the pixel ID. |
|
Y |
|
query |
Specifies the advertiser ID. |
|
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 |
---|---|---|---|---|
|
query |
Specifies the advertiser ID. |
|
Y |
|
query |
Specifies the search term. Use URL encoding conventions (i.e. a space should be replaced with a |
|
N |
|
query |
Specifies the page number. |
|
N |
|
query |
Specifies the total number of items to return. Maximum allowed value is |
|
N |
|
query |
Specifies the column to sort by. |
|
N |
|
query |
Specifies the sort direction. Allowed values:
|
|
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.