- 8 Minutes to read
Beacons
- 8 Minutes to read
Overview
Yahoo DSP supports Yahoo Dot Tag pixels which offer a universal, cross-platform tracking tag. Use a single pixel to record many different types of events for conversion tracking.
Endpoint
/traffic/beacons
Resources
Beacon
The Beacon
object contains the following fields:
Field | Description | Data Type | Create | Update |
---|---|---|---|---|
| Specifies the beacon ID. |
| N/A | Required |
| Specifies the beacon name. |
| Required | Optional |
| Specifies the advertiser ID. To learn more, refer to Advertisers. |
| Required | Optional |
| Specifies the parent Pixel ID. To learn more, refer to Pixels. |
| Required | Optional |
| Specifies the rule type for this beacon. Valid choices include:
|
| Required | Optional |
| Estimated value of the conversion. Refer to |
| Optional | Optional |
| (Optional) Set up a conversion category to automatically categorize data about a particular conversion activity and track your profits for that activity. Later, you can use the data to estimate your return on ad spend (ROAS). Set
|
| Required | Optional |
| A conversion occurs when a customer visits a web page that matches this URL. Required when |
| Required [1] | Optional |
| Rule operator for
Required when |
| Required [2] | Optional |
| You can create as many standard or custom events as you like. Refer to conditions object. Required when |
| Required [3] | Optional |
| The URL of the app. It should be Google app URL if targeting Android devices and Apple store app URL if targeting IOS devices. Example values: Required when |
| Optional [4] | Optional [4] |
| The region (country) of the Google play store or Apple app store where the app is uploaded. Allowed values:
Required when |
| Optional [5] | Optional [5] |
| The app ID is generated based on the appUrl and appLocale provided. Identifier representing mobile app in Google/Apple store. Example values: com.espn.score_center, 389801252 |
| N/A | N/A |
| Mobile measurement partner that provides conversions data for your mobile campaign. Allowed values:
Required when |
| Optional [6] | Optional [6] |
| A read-only field that specifies when the beacon was created. |
| N/A | N/A |
| A read-only field that specifies when the beacon was updated. |
| N/A | N/A |
Conditions Object
The conditions
object contains the following fields:
Field | Description | Data Type | Create | Update |
---|---|---|---|---|
| Event type. Can be one of the standard types defined below or a custom key name.
|
| Required | Optional |
| Rule operator. Allowed values:
Required when |
| Required [7] | Optional |
| Value for the event type. |
| Required | Optional |
Read Beacon
Read a specific beacon.
GET /traffic/beacons/{id}
Parameters
Parameter | Parameter Type | Description | Data Type | Required |
---|---|---|---|---|
| path | Specifies the beacon ID. |
| Y |
Example Request URL
GET https://dspapi.admanagerplus.yahoo.com/traffic/beacons/6525079
Example Response
{
"response": {
"id": 6525079,
"name": "event12",
"accountId": 1356341,
"pixelId": 10123456,
"ruleType": "EVENTS",
"conversion_category": "SIGNUP",
"conversion_default_value": 1.46,
"conditions": [
{
"key": "ACTION",
"operator": "GREATER_THAN",
"value": "5"
},
{
"key": "LABEL",
"operator": "LESS_THAN",
"value": "4"
}
],
"createdAt": "2017-06-28T23:34:50Z",
"updatedAt": "2017-06-28T23:34:50Z"
},
"errors": null,
"timeStamp": "2017-06-28T23:38:42Z"
}
Read Beacons
Read a filtered list of beacons.
GET /traffic/beacons?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/beacons?accountId=1356341&query=event&limit=2
Example Response
{
"response": [
{
"id": 6525028,
"name": "event12",
"accountId": 1356341,
"pixelId": 10123456,
"ruleType": "DESTINATION_URL",
"conversion_default_value": 1.46,
"conversion_category": "SIGNUP",
"createdAt": "2017-06-28T17:28:52Z",
"updatedAt": "2017-06-28T19:20:03Z"
},
{
"id": 6525032,
"name": "event12",
"accountId": 1356341,
"pixelId": 10123456,
"ruleType": "EVENTS",
"conversion_category": "PURCHASE",
"conversion_default_value": 1.46,
"createdAt": "2017-06-28T19:28:43Z",
"updatedAt": "2017-06-28T19:30:22Z"
}
],
"errors": null,
"timeStamp": "2017-06-29T01:37:17Z"
}
Create Beacon (Standard Events)
Create a new beacon with standard events rule.
POST /traffic/beacons
Example Request URL
POST https://dspapi.admanagerplus.yahoo.com/traffic/beacons
Example Request Body
{
"name": "event12",
"accountId": 1356341,
"pixelId": 10123456,
"ruleType": "EVENTS",
"conversion_category": "SIGNUP",
"conversion_default_value": 1.46,
"conditions": [
{
"key": "ACTION",
"operator": "GREATER_THAN",
"value": "5"
},
{
"key": "LABEL",
"operator": "LESS_THAN",
"value": "4"
}
]
}
Example Response
{
"response": {
"id": 6525079,
"name": "event12",
"accountId": 1356341,
"pixelId": 10123456,
"conversion_default_value": 1.46,
"conversion_category": "SIGNUP",
"ruleType": "EVENTS",
"conditions": [
{
"key": "ACTION",
"operator": "GREATER_THAN",
"value": "5"
},
{
"key": "LABEL",
"operator": "LESS_THAN",
"value": "4"
}
],
"createdAt": "2017-06-28T23:34:50Z",
"updatedAt": "2017-06-28T23:34:50Z"
},
"errors": null,
"timeStamp": "2017-06-28T23:34:51Z"
}
Create Beacon (Custom Events)
Create a new beacon with custom events rule.
POST /traffic/beacons
Parameters
All fields are specified in the body of the application/json
payload.
Example Request URL
POST https://dspapi.admanagerplus.yahoo.com/traffic/beacons
Example Request Body
{
"name": "event12",
"accountId": 1356341,
"pixelId": 10123456,
"ruleType": "EVENTS",
"conversion_category": "SIGNUP",
"conversion_default_value": 1.16,
"conditions": [
{
"key": "blue",
"operator": "GREATER_THAN",
"value": "5"
},
{
"key": "red",
"operator": "LESS_THAN",
"value": "4"
}
]
}
Example Response
{
"response": {
"id": 6525181,
"name": "event12",
"accountId": 1356341,
"pixelId": 10123456,
"conversion_default_value": 1.16,
"conversion_category": "SIGNUP",
"ruleType": "EVENTS",
"conditions": [
{
"key": "blue",
"operator": "GREATER_THAN",
"value": "5"
},
{
"key": "red",
"operator": "LESS_THAN",
"value": "4"
}
],
"createdAt": "2017-06-29T02:49:29Z",
"updatedAt": "2017-06-29T02:49:29Z"
},
"errors": null,
"timeStamp": "2017-06-29T02:49:30Z"
}
Create Beacon (Destination URL)
Create a new beacon with destination URL rule.
POST /traffic/beacons
Parameters
All fields are specified in the body of the application/json
payload.
Example Request URL
POST https://dspapi.admanagerplus.yahoo.com/traffic/beacons
Example Request Body
{
"name": "dest_url_beacon",
"accountId": 1356341,
"pixelId": 10123456,
"ruleType": "DESTINATION_URL",
"destinationUrl": "blue.com",
"destinationUrlOperator": "EQUALS",
"conversion_category": "SIGNUP",
"conversion_default_value": 1.16
}
Example Response
{
"response": {
"id": 6524938,
"name": "dest_url_beacon",
"accountId": 1356341,
"pixelId": 10123456,
"conversion_category": "SIGNUP",
"conversion_default_value": 1.16,
"ruleType": "DESTINATION_URL",
"destinationUrl": "blue.com",
"destinationUrlOperator": "EQUALS",
"conditions": [],
"createdAt": "2017-06-28T00:44:33Z",
"updatedAt": "2017-06-28T00:44:33Z"
},
"errors": null,
"timeStamp": "2017-06-28T00:44:34Z"
}
Create Beacon (App URL)
Create a new beacon with APP URL rule.
POST /traffic/beacons
Parameters
All fields are specified in the body of the application/json payload.
Example Request URL
POST https://dspapi.admanagerplus.yahoo.com/traffic/beacons
Example Request Body
{
"name": "app_url_beacon",
"accountId": "1356341",
"conversion_category": "APP_INSTALLATIONS",
"conversion_default_value": 20,
"condition": [
{
"key": "ACTION",
"operator": "EQUALS",
"value": "5"
}
],
"ruleType": "APP_URL",
"appUrl": "https://apps.apple.com/us/app/colorsnap-visualizer-iphone/id316256242&locale=en-us",
"appLocale": "en-us",
"mobileMeasurementPartner": "SINGULAR",
}
Example Response
{
"errors": null,
"response": {
"accountId": 1356341,
"appId": "316256242",
"appLocale": "en-us",
"appUrl": "https://apps.apple.com/us/app/colorsnap-visualizer-iphone/id316256242&locale=en-us",
"condition": [
{
"key": "ACTION",
"operator": "EQUALS",
"value": "5"
},
{
"key": "APP_ID",
"operator": "EQUALS",
"value": "316256242"
},
{
"key": "MOBILE_MEASUREMENT_PARTNER",
"operator": "EQUALS",
"value": "apsalar"
}
],
"conversion_category": "APP_INSTALLATIONS",
"conversion_default_value": 20.0,
"createdAt": "Sun Oct 18 01:32:04 PDT 2020",
"id": 1018,
"mobileMeasurementPartner": "SINGULAR",
"name": "app_url_beacon",
"pixelId": 10065562,
"ruleType": "APP_URL",
"updatedAt": "Sun Oct 18 01:32:04 PDT 2020"
},
"errors": null,
"timeStamp": "2020-10-18T08:32:04.712Z"
}
Update Beacon
Beacon update is not supported because any pixels which have been counted would be invalidated. It is recommended to simply create a new beacon instead.
Delete Beacon
The DSP Traffic API does not support deletion of beacons.
Get Beacon Instrumentation Code
Get instrumentation code for a beacon. The response object contains the following fields:
Field | Description | Data Type |
---|---|---|
| Javascript instrumentation code for the parent pixel |
|
| Instrumentation code for the parent pixel as an Image tag |
|
| Javascript instrumentation code for this beacon |
|
GET /traffic/beacons/{id}/i13n
Parameters
Parameter | Parameter Type | Description | Data Type | Required |
---|---|---|---|---|
| path | Specifies the beacon ID. |
| Y |
Example Request URL
GET https://dspapi.admanagerplus.yahoo.com/traffic/beacons/1005/i13n
Example Response
{
"response": {
"beaconId": 1005,
"pixelId": 10065562,
"urlSecureMultiple": "<script type=\"application/javascript\">(function(w,d,t,r,u){w[u]=w[u]||[];w[u].push({'projectId':'10000','properties':{'pixelId':'10065562'}});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>",
"urlSecureSingle": "<img src=\"https://sp.analytics.yahoo.com/spp.pl?a=10000&.yp=10065562\"/>",
"customEventScript": "<script type=\"application/javascript\">\nwindow.dotq = window.dotq || [];\nwindow.dotq.push(\n{\n'projectId': '10000',\n'properties': {\n'pixelId': '10065562',\n'qstrings': {\n'et': 'custom'\n}\n} } ); </script>"
},
"errors": null,
"timeStamp": "2021-03-06T02:16:27.035Z"
}