api-referenceGET
GEThttps://analytics.flowsery.com/analytics/api/v1/breakdown

Group visitors by any of 25 dimensions, including ones with no dedicated endpoint such as entry_page, exit_link, browser_version, os_version, via and the individual UTM parameters.

Bearer Token (workspace token or website API key)

Workspace Tokens Need a Website Selector

Workspace API tokens can access every website in the workspace. Pass either <code>websiteId</code> or <code>domain</code> so Flowsery knows which website to query or mutate. Website API keys are already scoped to one website, so the selector can be omitted.

Website Selector

ParameterTypeDescription
websiteIdstringWebsite ID to use with a workspace API token. Omit when authenticating with a website API key.
domainstringWebsite domain to use with a workspace API token when websiteId is not provided. Omit when authenticating with a website API key.

Query Parameters

ParameterTypeDescription
dimensionREQUIREDstringThe attribute to group visitors by: one of the 25 values listed under Dimensions. Any other value returns 400.
startAtstringISO 8601 start date/time (e.g. 2024-01-01T00:00:00Z). Defaults to the last 30 days when omitted.
endAtstringISO 8601 end date/time. Defaults to now when omitted.
timezonestringTimezone for aggregation (e.g., UTC, America/New_York). Falls back to the site's configured timezone.
limitnumberMaximum rows to return (1-1000, default: 100).
offsetnumberRows to skip for pagination (min 0, default: 0).

Dimensions

ParameterTypeDescription
devicestringDevice type: Desktop, Mobile or Tablet.
pagestringPage path.
entry_pagestringFirst page of the session.
exit_linkstringOutbound link a visitor clicked to leave the site. Revenue is always 0.
hostnamestringHostname the page was served from.
referrerstringReferrer source name such as Google, or the domain for sites Flowsery does not recognize. Rows include iconUrl.
channelstringAcquisition channel, the same rows as GET /channels.
campaignstringUTM campaign, the same rows as GET /campaigns.
goalstringGoal name. visitors holds the completion count and revenue is always 0.
countrystringCountry name. Rows include countryCode.
regionstringRegion or state as a full name, such as California. Rows include countryCode.
citystringCity name. Rows include countryCode.
browserstringBrowser name.
browser_versionstringBrowser version.
osstringOperating system.
os_versionstringOperating system version.
utm_sourcestringThe utm_source URL parameter.
utm_mediumstringThe utm_medium URL parameter.
utm_campaignstringThe utm_campaign URL parameter.
utm_termstringThe utm_term URL parameter.
utm_contentstringThe utm_content URL parameter.
refstringThe ref URL parameter.
sourcestringThe source URL parameter.
viastringThe via URL parameter, often used for affiliate and partner links.
all_paramsstringEvery tracking parameter of the session joined into one value, such as utm_source=google&utm_medium=cpc.

Filter Parameters

ParameterTypeDescription
filter_countrystringCountry name as returned by /countries, e.g. United States. Use | for several values, ! to exclude and ~ to match part of the value.
filter_regionstringRegion or state name as returned by /regions, e.g. California.
filter_citystringCity name.
filter_devicestringDevice type: Desktop, Mobile or Tablet. Values are case-sensitive.
filter_browserstringBrowser name. Safari includes Mobile Safari automatically.
filter_osstringOperating system (Mac OS, Windows, iOS, Android).
filter_referrerstringReferrer as returned by /referrers: a source name such as Google for recognized sites, otherwise the domain.
filter_refstringThe ref URL parameter value.
filter_sourcestringThe source URL parameter value.
filter_viastringThe via URL parameter value.
filter_utm_sourcestringUTM source.
filter_utm_mediumstringUTM medium.
filter_utm_campaignstringUTM campaign.
filter_utm_termstringUTM term.
filter_utm_contentstringUTM content.
filter_pagestringPage path or URL.
filter_entry_pagestringEntry page path or URL.
filter_hostnamestringHostname/domain.
filter_channelstringMarketing channel.
filter_goalstringGoal name.

Response Fields

Each item in the <code>data</code> array contains the grouped value as <code>value</code>, visitor count, revenue split into <code>newRevenue</code> and <code>renewalRevenue</code>, and its share of visitors as <code>percentage</code>. Geographic dimensions add <code>countryCode</code> and <code>referrer</code> adds <code>iconUrl</code>. A value that was not captured comes back as <code>Unknown</code>.

Values Match the Filters

Values come back in the form the <code>filter_*</code> parameters expect, so any row can be sent back as a filter. Regions are full names (<code>California</code>, not <code>CA</code>), devices are capitalized (<code>Desktop</code>, <code>Mobile</code>, <code>Tablet</code>) and referrers are source names (<code>Google</code>, not <code>google.com</code>).

Combining Filters

Separate several values inside one filter parameter with |. Combine a dimension with filters to answer narrower questions (e.g., <code>dimension=via&filter_country=United States&filter_device=Mobile</code>).
Example Request (Curl)
curl --request GET \
  --url 'https://analytics.flowsery.com/analytics/api/v1/breakdown?dimension=via&limit=3' \
  --header 'Authorization: Bearer <api-key>'
200
{
  "status": "success",
  "data": [
    {
      "value": "partner_anna",
      "visitors": 640,
      "revenue": 2310,
      "newRevenue": 1980,
      "renewalRevenue": 330,
      "percentage": 51.2
    },
    {
      "value": "partner_marc",
      "visitors": 410,
      "revenue": 1270,
      "newRevenue": 1270,
      "renewalRevenue": 0,
      "percentage": 32.8
    },
    {
      "value": "podcast",
      "visitors": 200,
      "revenue": 380,
      "newRevenue": 290,
      "renewalRevenue": 90,
      "percentage": 16
    }
  ],
  "pagination": {
    "limit": 3,
    "offset": 0,
    "total": 14
  }
}