API Documentation: Analytics Responses

The following responses can be gathered per the listed API endpoints. Note that response data may change per user, configuration, and supplied parameters. The JSON data structure, however, will remain consistent.

Actions

  1. Views
  2. Impressions
  3. Chapters
  4. Breakdown
  5. Popular

Views: /api/analytics/views.php

    {
      "success": 1,
      "data": {
        "total_count": integer,
        "by_date": [
          {
            "date": string YYYY-MM-DD hh:mm:ss),
            "count": integer
          }
        ],
        "by_hash_and_date": [
          {
            "hash": string,
            "address": string,
            "date": string (YYYY-MM-DD hh:mm:ss),
            "count": integer
          }
        ]
      },
      "google_chart": string (with escaped characters),
      "error": string,
      "warnings": string
    }
    

Views: /api/analytics/impressions.php

{
    {
      "success": 1,
      "data": {
        "wm_impressions": integer,
        "youtube_impressions": integer,
        "loads": integer,
        "views": integer,
        "views_percent": float (percentage),
        "loads_percent": float (percentage)
      },
      "google_chart": string (with escaped characters),
      "error": string,
      "warnings": string
    }
    

Views: /api/analytics/chapters.php

{
    {
      "success": 1,
      "data": {
        "total_clicks": integer,
        "by_time": [
          {
            "time": integer (seconds),
            "title": string,
            "clicks": integer
          }
        ]
      },
      "google_chart": string (with escaped characters),
      "error": string,
      "warnings": string
    }
    

Device and Traffic Breakdown: /api/analytics/breakdown.php

    {
      "success": 1,
      "data": {
        "wm_count": integer,
        "youtube_count": integer,
        "traffic": {
          "[Referral Source]": integer
        },
        "devices": {
          "[Device Type 1]": integer
        }
      },
      "google_chart": {
        "devices": string (with escaped characters),
        "traffic": string (with escaped characters)
      },
      "error": string,
      "warnings": string
    }
    

Popular Videos: /api/analytics/popular.php

You can specify the number of popular videos to return with the num parameter.
    {
      "success": 1,
      "data": [
        {
          "hash": string,
          "title": string,
          "count": integer
        }
      ],
      "google_chart": string (with escaped characters),
      "error": string,
      "warnings": string
    }
    
Close