Statistics URL is returned for each presentation object:
https://orbitvu.co/api/v1/presentations/<id>/statistics/[.json|.xml]Returned data
This endpoint returns a list of URLs to particular statistical data, e.g.:
{
   "countries": "https://orbitvu.co/api/v1/presentations/46/statistics/countries",
   "cities": "https://orbitvu.co/api/v1/presentations/46/statistics/cities",
   "referers": "https://orbitvu.co/api/v1/presentations/46/statistics/referers",
   "views": "https://orbitvu.co/api/v1/presentations/46/statistics/views"
   "views2": "https://orbitvu.co/api/v1/presentations/46/statistics/views/2/",
}Every statistics URL can be filtered with date_range parameter. Returned values are:
- countries
A number of views on presentation grouped by country in the specific date range (paginated):
{
    "count": 1,
    "next": null,
    "previous": null,
    "results": [
        {
            "country_name": "Poland",
            "country_code": "PL",
            "views": 245
        }
    ]
}- cities
 The number of views on presentation grouped by country and city in a particular date range (paginated):
{
    "count": 1,
    "next": null,
    "previous": null,
    "results": [{
        "name": "Pila",
        "views": 20,
        "country": "Poland",
        "country_code": "PL",
        "country_name": "Poland"
     }]
}- referers
 The number of views on presentation grouped by referer specific date range (paginated):
{
   "count": 1,
   "next": null,
   "previous": null,
   "results": [
       {"hostname": http://orbitvu.co/001/YmPwz3333DSsiWD9peD9c6/ov3602/3/view",
        "views": 10
       }]}For the referers there is additional filtering option. It is possible to provide specific date range using date_range_start and date_range_end parameters. Details in the Filtering section below.
- views
The number of views in a specific date range. This is for backwards compatibility, it is preferred to use views2 endpoint that provides more information. Returned data:
[
    {
        "27-02-2015": 0
    },
    {
        "28-02-2015": 0
    },
    {
        "01-03-2015": 0
    },
    {
        "02-03-2015": 0
    },
    {
        "03-03-2015": 0
    },
    ...
]- views2
The number of views in particular date range. Different format than views, e.g.:
[
    {
        "date": "27-02-2015",
        "total_views": 0,
        "views": 0
    },
    {
        "date": "28-02-2015",
        "total_views": 0,
        "views": 0
    },
    {
        "date": "01-03-2015",
        "total_views": 0,
        "views": 0
    },
    ...
]Returned data:
- views is a number of views on currently viewed presentation
- total_views is a sum of views
Filtering
Filtering can be done with date_range parameter and (only for referers endpoint) date_range_start, date_range_end
Possible values and format:
- date_range values: last_year, last_month, last_week, years, this_month, this_year, range
- date_range default value: last_month
- date_range_start and date_range_end format: YYYY-mm-dd
The value of range is only valid for referers statistics and will only work if additional query string parameters are provided: date_range_start and date_range_end.
The value of years is only valid for views and views2 endpoints. For other stats data are held up to one year!
Returned value is a list of dictionaries defining a cumulative number of views for the chosen date range, e.g. for the last_week it might be:
URL: https://orbitvu.co/api/v1/presentations/1233/statistics/views.json?date_range=last_week
The URL used above is only for documentation purposes and will not work when visited directly!
Result:
[
  {
      "13-09-2014": 130
  },
  {
      "14-09-2014": 332
  },
  {
      "15-09-2014": 265
  },
  {
      "16-09-2014": 198
  },
  {
      "17-09-2014": 390
  },
  {
      "18-09-2014": 323
  },
  {
      "19-09-2014": 302
  }
]For referers with range:
URL: https://orbitvu.co/api/v1/presentations/1234/statistics/referers.json?date_range=range&date_range_start=2015-03-01&date_range_end=2015-04-01
Result:
{
    "count": 1,
    "next": null,
    "previous": null,
    "results": [
        {
            "hostname": "http://orbitvu.co/001/YmPwzTdd3DSsiWD9peD9c6/ov3602/3/view",
            "views": 0
        }
    ]
}