Analytics

Site Summary

Summary of all events within a date range for a particular site_id

GET /api/v2/analytics/?site_id=12345&
    report_type=full_report&
    from_date=2015-07-01&
    to_date=2015-07-05

Parameters

Name

Type

Description

site_id

string

required ID of the Site you want to get the report for

report_type

string

required Example: full_report

from_date

string

required YYYY-MM-DD formatted date string

to_date

string

required YYYY-MM-DD formatted date string

events

string

By default this endpoint returns a standard set of event types. See event types below for more details.

Event types

By default, this endpoint returns data for the following events:

  • site-page-view

  • form-submit

  • link-call

  • link-outgoing

You can optionally pass an events list, which is a comma separated list of "Event names" to report on.

Example: ?events=form-submit,link-facebook,link-call

Which events that are tracked will depend somewhat on the elements that are present on your template, but a list of all possible events and their "Event name" can be found here:

Response

{
  "events": {
    "site-page-view": {
      "average": "0.00",
      "timeline": {
        "2015-07-01": 0,
        "2015-07-02": 0,
        "2015-07-03": 0,
        "2015-07-04": 0,
        "2015-07-05": 0
      },
      "total": "0"
    },
    ...
  },
  "meta": {
    "events": [
      "form-submit",
      "link-outgoing",
      "site-page-view",
      ...
    ],
    "series": [
      "2015-07-01",
      "2015-07-02",
      "2015-07-03",
      "2015-07-04",
      "2015-07-05"
    ]
  }
}

Last updated