Introduction
The Content.ad Push Notification API allows the publisher to get the components of an ad to serve in their push notification. It must be called each time a push notification is to be sent to a subscriber. Widget results are returned as a JSON object, and settings (type of content, etc.) are managed in the domain and widget sections of the Content.ad admin.

Setting Up the API Call

  1. Set up a Push-Notification-API widget in the Content.ad admin. Performance reports can be broken out by widget or domain. If the domain is new, it must be approved by the Content.ad team before showing sponsored content. We recommend setting up a separate domain for push, using push as a subdomain (i.e. push.example.com) so that performance of push traffic will be separated from on-page traffic.
  2. Copy the installation code provided. Insert the subscriber's IP Address, User Agent, and Push ID into the parameters, encoding all values.

Copy code here:

http://api.content-ad.net/api.svc/GetWidget/[Unique Widget ID]/[Unique Domain ID]/?url=[Domain URL (URL encoded)]&ipAddress=[Visitor's IP Address]&userAgent=[Visitor's User Agent String (URL encoded)]&pushid=[Unique User ID]

Please note: The visitor's IP address and encoded user agent included above are only needed when the API call is made server-side.

Query String Parameters

 Example JSON Result Set

{
 "impression_key":"{string}",
 "impression_served_url":"https://api.content-ad.net/widget/impression/served?ik=2019091214_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&served=true&wid=XXXXXX&haid=XXXXXX"
 "slot_count":1
 "articles":
 [
  {
  "slot": 1,
  "url": "http://example.content.ad/sample-url-here",
  "title": "A Very Interesting Article You May Like",
  "image": "http://example.content.ad/sample-image.jpg"
  "sponsored": false
  "sponsored_by": "domain.com"
  "cpc":x.xxxx
  "score":x.xxxx
  }
 ]
}

The performance score is a general indication of performance across our network. It will not accurately predict relative performance across all networks and should only be used as a guide.

 

api version: 1.0.0

Did this answer your question?