Skip to content
Vince Forgione edited this page May 11, 2015 · 2 revisions

Per property Clickhole, A.V. Club, The Onion, Onion Studios:

Page views

  • Granular (every 5min / 30 min / what's available) over the course of a queryable day from the last two weeks
  • Today, so far.

Video views

  • Granular (every 5min / 30 min / what's available) over the course of a queryable day from the last two weeks
  • Today, so far.

Trending

  • List of trending content from the last week for each property, top 5 to start

Daily quarterly average

  • Average total number of pageviews per day, per property for the last quarter (ideally just in a flexible date range)

general notes about influxer

shard configs

  1. granular data exists for only 24 hours
  2. 5m rollup data exists for 14 days
  3. 1h rollup data exists for 1 year
  4. 1d rollup data exists for 10 years

meaning, if you want up to the minute insight on a metric, it will only be available for data recieved within the last 24 hours. after that, it's rolled up into the other aggregate series and flagged for deletion by the database.

caching

all requests to the json endpoints are cached for 5 minutes

pageviews and videoplays

endpoints

  • pageviews = http://influxer.onion.com/pageviews.json
  • videoplays = http://influxer.onion.com/videoplays.json

query params

key format default value
site \w+ none (all sites)
from \d{4}-\d{2}-\d{2}T\d{2}\:\d{2}\:\d{2} defaults to yesterday at (midnight - 1m) to capture yesterday
to \d{4}-\d{2}-\d{2}T\d{2}\:\d{2}\:\d{2} defaults to yesterday at (midnight - 1m) to capture yesterday
group_by \d+[mhd]{1} 10m

site names

  • onion
  • avclub
  • clickhole
  • onionstudios
  • onionads

examples

if you wanted the last two weeks of onion pageviews at a 5 minute aggregate and today's date is May 15th

$ curl -G "http://influxer.onion.com/pageviews.json?site=onion&from=2015-05-01T00:00:00&to=2015-05-15T00:00:00&group_by=5m"

if you wanted today's clickhole pageviews at a 5 minute aggregate and today's date is May 15th

$ curl -G "http://influxer.onion.com/pageviews.json?site=clickhole&from=2015-05-14T23:59:59&to=2015-05-16T00:00:00&group_by=5m"

if you wanted yesterday's videoplays from onion studios at a 10 minute aggregate

$ curl -G "http://influxer.onion.com/videoplays.json?site=onionstudios"

trending content

endpoints

  • http://influxer.onion.com/trending.json

query params

key format default value
site \w+ none (all sites)
offset \d+[mhd]{1} 10m
limit \d+ 20

site names

  • onion
  • avclub
  • clickhole
  • onionstudios

examples

if you wanted the top 5 trending articles on clickhole over the last 12 hours

$ curl -G "http://influxer.onion.com/trending.json?site=clickhole&offset=12h&limit=5"