Analytics

Breakdown

Visitors and conversions split by one dimension (source, channel, campaign, keyword, affiliate, entry/landing page, page, hostname, country, region, city, device, browser, os), largest first. Row names can be used as filter_value with that dimension. A visitor counts in every row they appear in, so rows can add up to more than the site's visitors. compare=previous_period adds each row's previous-period values.

get/sites/{site}/breakdowns/{dimension}

Request

  • Base URL: https://api.onelence.com/v1
  • URL: https://api.onelence.com/v1/sites/{site}/breakdowns/{dimension}
  • Auth: one of:
    • OAuth 2 (authorization code, authorization URL https://api.onelence.com/oauth/authorize, token URL https://api.onelence.com/oauth/token, scopes: analytics:read)
    • HTTP bearer

Path parameters

sitestring required

Site domain (e.g. example.com) or site id. Defaults to the workspace's newest active site.

dimension'country' | 'region' | 'city' | 'hostname' | 'page' | 'entry' | 'source' | 'channel' | 'campaign' | 'keyword' | 'affiliate' | 'browser' | 'os' | 'device' required

Query parameters

startstring

Window start: a date (YYYY-MM-DD) or ISO 8601 date-time. Defaults to 30 days before end.

endstring

Window end, inclusive for a date. Defaults to now.

filter_dimension'country' | 'region' | 'city' | 'hostname' | 'page' | 'entry' | 'source' | 'channel' | 'campaign' | 'keyword' | 'affiliate' | 'browser' | 'os' | 'device'

Narrow to one value of a dimension, e.g. source, channel, campaign, country, entry (landing page) or page.

filter_valuestring

The value to keep, e.g. google, /pricing or DE. Requires filter_dimension.

compare'none' | 'previous_period'

previous_period adds each row's visitors and conversions in the same-length window right before, with the percent change (default none). A row absent from that window counts 0 there, or has unknown (null) previous values when that window held more rows than one read returns.

limitinteger

Items per page (default 25, max 100).

cursorstring

next_cursor from the previous page.

Response

Success.

object'list' required
has_moreboolean required
next_cursorstring nullable required
notestring required
dimension'country' | 'region' | 'city' | 'hostname' | 'page' | 'entry' | 'source' | 'channel' | 'campaign' | 'keyword' | 'affiliate' | 'browser' | 'os' | 'device' required
names_hiddenboolean required

Changes

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