Analytics

Site Summary

Summary of all events within a date range for a particular site_id
1
GET /api/v2/analytics/?site_id=12345&
2
report_type=full_report&
3
from_date=2015-07-01&
4
to_date=2015-07-05
Copied!

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:
What events are tracked automatically?
DevHub Docs

Response

1
{
2
"events": {
3
"site-page-view": {
4
"average": "0.00",
5
"timeline": {
6
"2015-07-01": 0,
7
"2015-07-02": 0,
8
"2015-07-03": 0,
9
"2015-07-04": 0,
10
"2015-07-05": 0
11
},
12
"total": "0"
13
},
14
...
15
},
16
"meta": {
17
"events": [
18
"form-submit",
19
"link-outgoing",
20
"site-page-view",
21
...
22
],
23
"series": [
24
"2015-07-01",
25
"2015-07-02",
26
"2015-07-03",
27
"2015-07-04",
28
"2015-07-05"
29
]
30
}
31
}
Copied!
Last modified 5mo ago