Reporting

Get site analytics

Get analytics history for a site over a period of time.

If neither from nor to is provided, the queried period is the past 30 days. If only from is provided, the period is from plus 30 days. If only to is provided, the period is the 30 days up to and including to.

result=activities can't be combined with dimension; the request returns an error.

Without dimension, the response is a single object of metrics. With dimension, the response is an array with one entry per dimension value, each holding the dimension and its metrics.

get/api/analytics/site/{site_name}

Request

  • Base URL
    https://api.duda.co
  • URL
    https://api.duda.co/api/analytics/site/{site_name}
  • Auth
    HTTP basic

Path parameters

site_namestring required

The site's unique name (its ID), returned when the site is created.

Query parameters

fromstring date

Start date, for example 2016-03-01. Defaults to 30 days before to.

tostring date

End date, for example 2016-03-31. Defaults to the current day.

dimension'system' | 'geo'

The dimension to break the results down by. system groups by browser and operating system; geo groups by country and region. Can't be combined with result=activities.

result'traffic' | 'activities'

The type of metrics to return.

dateGranularity'DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS'

The time unit to aggregate results by.

Response

OK

OR
OR
OR

Example response

{
  "VISITS": 100,
  "VISITORS": 50,
  "PAGE_VIEWS": 150
}

Changes

No recorded changes to this operation across all 1 revision of this API.