Real-Time Stats

Real-time stats service will allow you get get data up to a millisecond latency. This forms the basis of the ‘Real time dashboard’ functionality.

Contents on this page

GET /api/quick-stats/

Endpoint

/api/quick-stats/[Endpoint]

Method

GET

Available endpoints 

  • network
  • countries
  • single
  • singlewithcampaignfilter
  • singlehourly
  • singlehourlydays


Per endpoint the following query parameters can be used:


EndpointParametersDescription
networkcampaignOptional. Place a campaign ID here to get stats for one specific campaign.
countriescampaignOptional. Place a campaign ID here to get stats for one specific campaign.
countriesdateOptional. It’s the date the results will be returned for.
singletype

One of:


impression

click

pixel

impression_bid_spend


“pixel” are the loads of on-site pixels


 “impression_bid_spend” are the media costs
singlewithcampaignfiltertypesame as “single”
singlewithcampaignfiltercampaignYou place here campaign id to get stats for one specific campaign.
singlehourlytypesame as "single"
singlehourlydaystypesame as "single
singlehourlydaysdaysnumber of days to return

Example responses

Network endpoint 

{
 "response":{
  "status":"OK",
  "stats":{
   "impressions":2566925,
   "revenue":3695.38,
   "clicks":1900,
   "pixels":77368
  }
 },
 "audit":{
  "user":"Test 2",
  "user_id":"29"
 },
 "debug":{
  "parsetime":"2,356.137037",
  "now":"2014-03-28 14:03:24"
 }
}


Countries

{
 "response":{
  "status":"OK",
  "stats":{
   "A1":10,
   "A2":1,
   "ABW":1,
   "AP":3,
   "CZE":27,
   "DEU":623,
   "DNK":87,
   "ESP":59,
   "EST":7,
   "EU":788,
   "FIN":4,
   "FRA":166,
   "GBR":1315,
   "SGP":225
  }
 },
 "audit":{
  "user":"Test 2",
  "user_id":"29"
 },
 "debug":{
  "parsetime":"805.195093",
  "now":"2014-03-28 14:11:50"
 }
}


Single

{
 "response":{
  "status":"OK",
  "stats":2620040
 },
 "audit":{
  "user":"Test 2",
  "user_id":"29"
 },
 "debug":{
  "parsetime":"616.205931",
  "now":"2014-03-28 14:12:44"
 }
}


Singlehourly

{
 "response":{
  "status":"OK",
  "stats":{
   "2014-03-28 00:00:00":76411,
   "2014-03-28 01:00:00":45965,
   "2014-03-28 02:00:00":30963,
   "2014-03-28 03:00:00":33325,
   "2014-03-28 04:00:00":46626,
   "2014-03-28 05:00:00":104147,
   "2014-03-28 06:00:00":199748,
   "2014-03-28 07:00:00":289071,
   "2014-03-28 08:00:00":320854,
   "2014-03-28 09:00:00":321975,
   "2014-03-28 10:00:00":345761,
   "2014-03-28 11:00:00":431256,
   "2014-03-28 12:00:00":303186,
   "2014-03-28 13:00:00":81994
  }
 },
 "audit":{
  "user":"Test 2",
  "user_id":"29"
 },
 "debug":{
  "parsetime":"746.614218",
  "now":"2014-03-28 14:14:37"
 }
}


Singlehourlydays

{
 "response":{
  "status":"OK",
  "from_cache":true,
  "stats":{
   "2014-03-27 00:00:00":48674,
   "2014-03-27 01:00:00":33062,
   "2014-03-27 02:00:00":22572,
   "2014-03-27 03:00:00":22449,
   "2014-03-27 04:00:00":26330,
   "2014-03-27 05:00:00":72327,
   "2014-03-27 06:00:00":144258,
   "2014-03-27 07:00:00":124989,
   "2014-03-27 08:00:00":153451,
   "2014-03-27 09:00:00":218178,
   "2014-03-27 10:00:00":208852,
   "2014-03-27 11:00:00":361086,
   "2014-03-27 12:00:00":226340,
   "2014-03-27 13:00:00":254827,
   "2014-03-27 14:00:00":326146,
   "2014-03-27 15:00:00":265574,
   "2014-03-27 16:00:00":185768,
   "2014-03-27 17:00:00":205576,
   "2014-03-27 18:00:00":225985,
   "2014-03-27 19:00:00":233426,
   "2014-03-27 20:00:00":194411,
   "2014-03-27 21:00:00":168028,
   "2014-03-27 22:00:00":131273,
   "2014-03-27 23:00:00":110783,
   "2014-03-28 00:00:00":76411,
   "2014-03-28 01:00:00":45965,
   "2014-03-28 02:00:00":30963,
   "2014-03-28 03:00:00":33325,
   "2014-03-28 04:00:00":46626,
   "2014-03-28 05:00:00":104147,
   "2014-03-28 06:00:00":199748,
   "2014-03-28 07:00:00":289071,
   "2014-03-28 08:00:00":320854,
   "2014-03-28 09:00:00":321975,
   "2014-03-28 10:00:00":345761,
   "2014-03-28 11:00:00":431256,
   "2014-03-28 12:00:00":303186,
   "2014-03-28 13:00:00":92035
  }
 },
 "audit":{
  "user":"Test 2",
  "user_id":"29"
 },
 "debug":{
  "parsetime":"1,063.405991",
  "now":"2014-03-28 14:16:21"
 }
}