Beacons

Overview

Oath Ad Platforms DSP supports Yahoo’s 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

https://dspapi.admanagerplus.yahoo.com/traffic/beacons

Resources

The Beacon object contains the following fields:

Name Description Type Add
id ID of the beacon. integer N/A
name Name of the beacon. text Required
accountId Advertiser/account ID. To learn more, see Advertisers. integer Required
ruleType

Rule type for this beacon.

  • EVENTS - Track when a specific event or action is triggered on your site.
  • DESTINSTION_URL - Track customer visits to specific pages. Specify values for destinationUrl and destinationUrlOperator fields.
text Required
conversion_default_value Estimated value of the conversion. See conversion_category. integer Optional
conversion_category

Optionally 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 conversion_default_value to 1 to count the number of events or set an estimated average dollar value that each event is worth to your organization for ROAS calculations.

  • CONVERSION
  • SIGNUP - A user creates an account on your site, or signs up for a newsletter or royalty program.
  • LEAD - A potential customer engages with your site by browsing products, favoriting items, or adding items to a wish list.
  • ADD_TO_CART - A user adds one or more items to a shopping cart.
  • APP_INSTALLATIONS - A user installs an app on your site. The app installation may lead to further sales on tokens, or present other sales opportunities.
  • OTHERS - A user performs another activity that is not covered by any of the categories.
  • PURCHASE - A user presses the Buy button on your site.
  • IN_APP_EVENT
  • VIEW_CONTENT
  • ADD_TO_WISHLIST
  • INITIATE_CHECKOUT
  • ADD_PAYMENT_INFO
text Required (1)
destinationUrl A conversion occurs when a customer visits a web page that matches this URL. (1) Required when ruleType is DESTINSTION_URL. text Required (1)
destinationUrlOperator

Rule operator for destinationUrl. (1) Required when ruleType is DESTINSTION_URL.

  • EQUALS - For a conversion to occur, supply the full exact URL including the http/https protocol.
  • CONTAINS - For a conversion to occur, supply any part of the URL.
  • REGEX - Regular expression. Use for wildcard searches where conversions occur on any site within a domain or several domains.
  • BEGINS_WITH
text Required (1)
isActive (Read-Only) Indicates if the Beacon is active or inactive. boolean N/A
createdAt (Read-Only) Creation timestamp. datetime N/A
updatedAt (Read-Only) Last updated timestamp. datetime N/A
condition You can create as many standard or custom events as you like. Refer to condition object. (1) Required when ruleType is EVENTS. Required (1)  

Condition Object

The condition object contains the following fields:

Name Description Type Add
key

Event type. Can be one of the standard types defined below or a custom key name.

  • CATEGORY - The object you want to track, such as clothes, electronics, or furniture.
  • ACTION - The type of action the user takes with the category object, such as clicking a button.
  • LABEL - A label for the event details. For example, add an item to a shopping cart, place an order, make a request, or download a file.
  • VALUE - A numeric value associated with the goal. For example, the number 10.
text Required
operator

Rule operator when ruleType is EVENTS.

  • EQUALS
  • LESS_THAN
  • GREATER_THAN
  • CONTAINS
  • REGEX - Regular expression. Use for wildcard searches where conversions occur if the value field contains any text string.
text Required
value Value for the event type. text Required

Read Beacon

Get data for a specific beacon.

GET /traffic/beacons/{id}

Parameters

Table 60 Read Beacon Parameters
Parameter Parameter Type Description Data Type Required
id path Specifies the beacon ID. integer Y

Example Request URL

GET https://dspapi.admanagerplus.yahoo.com/traffic/beacons/6525079

Example Response

{
  "response": {
    "condition": [
      {
        "key": "ACTION",
        "operator": "GREATER_THAN",
        "value": "5"
      },
      {
        "key": "LABEL",
        "operator": "LESS_THAN",
        "value": "4"
      }
    ],
    "conversion_category": "SIGNUP",
    "ruleType": "EVENTS",
    "id": 6525079,
    "name": "event12",
    "accountId": 1356341,
    "updatedAt": "2017-06-28T23:34:50Z",
    "isConversion": true,
    "isActive": true,
    "createdAt": "2017-06-28T23:34:50Z",
    "conversion_default_value": 1.46
  },
  "errors": null,
  "timeStamp": "2017-06-28T23:38:42Z"
}

Read Beacons

Get a filtered list of beacons.

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

Parameters

Table 61 Read Beacons 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/beacons?accountId=1356341&query=event&limit=2

Example Response

{
  "response": [
    {
      "id": 6525028,
      "name": "event12",
      "accountId": 1356341,
      "updatedAt": "2017-06-28T19:20:03Z",
      "isActive": true,
      "createdAt": "2017-06-28T17:28:52Z",
      "conversion_default_value": 1.46
    },
    {
      "conversion_category": "SIGNUP",
      "id": 6525032,
      "name": "event12",
      "accountId": 1356341,
      "updatedAt": "2017-06-28T19:30:22Z",
      "isActive": false,
      "createdAt": "2017-06-28T19:28:43Z",
      "conversion_default_value": 1.46
    }
  ],
  "errors": null,
  "timeStamp": "2017-06-29T01:37:17Z"
}

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.

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,
  "ruleType": "EVENTS",
  "conversion_category": "SIGNUP",
  "conversion_default_value": 1.46,
  "condition": [
    {
      "key": "ACTION",
      "operator": "GREATER_THAN",
      "value": "5"
    },
    {
      "key": "LABEL",
      "operator": "LESS_THAN",
      "value": "4"
    }
  ]
}

Example Response

{
  "response": {
    "condition": [
      {
        "key": "ACTION",
        "operator": "GREATER_THAN",
        "value": "5"
      },
      {
        "key": "LABEL",
        "operator": "LESS_THAN",
        "value": "4"
      }
    ],
    "conversion_category": "SIGNUP",
    "ruleType": "EVENTS",
    "id": 6525079,
    "name": "event12",
    "accountId": 1356341,
    "updatedAt": "2017-06-28T23:34:50Z",
    "isConversion": true,
    "isActive": true,
    "createdAt": "2017-06-28T23:34:50Z",
    "conversion_default_value": 1.46
  },
  "errors": null,
  "timeStamp": "2017-06-28T23:34:51Z"
}

Create Beacon (Custom Events)

Create a new Beacon with custom events rule.

POST /traffic/beacons

Example Request URL

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

Example Request Body

{
  "name": "event12",
  "accountId": 1356341,
  "ruleType": "EVENTS",
  "conversion_category": "SIGNUP",
  "conversion_default_value": 1.16,
  "isActive": true,
  "condition": [
    {
      "key": "blue",
      "operator": "GREATER_THAN",
      "value": "5"
    },
    {
      "key": "red",
      "operator": "LESS_THAN",
      "value": "4"
    }
  ]
}

Example Response

{
  "response": {
    "condition": [
      {
        "key": "blue",
        "operator": "GREATER_THAN",
        "value": "5"
      },
      {
        "key": "red",
        "operator": "LESS_THAN",
        "value": "4"
      }
    ],
    "conversion_category": "SIGNUP",
    "ruleType": "EVENTS",
    "id": 6525181,
    "name": "event12",
    "accountId": 1356341,
    "updatedAt": "2017-06-29T02:49:29Z",
    "isConversion": true,
    "isActive": true,
    "createdAt": "2017-06-29T02:49:29Z",
    "conversion_default_value": 1.16
  },
  "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 parameters 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,
  "ruleType": "DESTINSTION_URL",
  "destinationUrl": "blue.com",
  "destinationUrlOperator": "EQUALS"
}

Example Response

{
  "response": {
    "condition": [],
    "ruleType": "DESTINSTION_URL",
    "destinationUrl": "blue.com",
    "destinationUrlOperator": "EQUALS",
    "id": 6524938,
    "name": "dest_url_beacon",
    "accountId": 1356341,
    "updatedAt": "2017-06-28T00:44:33Z",
    "isActive": true
    "createdAt": "2017-06-28T00:44:33Z"
  },
  "errors": null,
  "timeStamp": "2017-06-28T00:44:34Z"
}

Delete Beacon

The DSP Traffic API does not support deletion of beacons.