Considerations about the Analytics API (Deprecated)
Was this article helpful?
Be aware of some notable points about the v2 Analytics API, including differences between the analytics in the Backlot UI and the API.
Some considerations about the data available from the analytics API are noted below, some in comparison with analytics in the Backlot UI.
Because they are based on different clock start times, date/time ranges in Analytics UI and Analytics API differ by one day. When specifying date ranges in Analytics UI, you specify the date range you are interested in (for example, April 1 through April 25).
In the Analytics API, however, you need to specify the date range + 1 day. So, for the same example, to retrieve analytics for April 1 through 25, in the API you need to specify April 1 through April 26. (For details, see the date_range attribute.)
- Units in Hours
Likewise, data involving date/time ranges is returned in increments of an hour, not by minute. That is, even if you specify a date/time range that includes a certain minute, the data returned are rounded down to the nearest hour.
- Unidimensional Data
In the Analytics UI, for many of the reports, you are shown data in multiple dimensions, such as devices by geographical distribution by time (three dimensions).
With the Analytics API, however, you might need to make multiple requests to acheve the same result. For instance, continuing the example above, you need to make one call to retrieve data related to devices and a second call to retrieve data related to geographic distribution.
- Deriving Data
For other values, in many cases, the desired values can be derived from the data returned by the Analytics API. For example, with the Analytics API you can retrieve the total number of unique users for a given time period, but to derive the average number of unique users per day, you need to divide the totals by number of days involved.