Web analytics over the API

GET /web/overview and /web/breakdown: parameters, every breakdown dimension, and what each metric means.

Embed
Preview of the card
<a href="https://lucidace.com/help/web-analytics-api"><img src="https://lucidace.com/help/_api/public/orgs/af34862a-c837-4478-8335-0505efe40459/spaces/2f4b888b-c4e6-488b-81bd-6e838fb12d2e/pages/f671607a-7857-455b-b4cb-f0cda8bb1738/social-card.svg?v=3e7ae33eec8b" alt="Web analytics over the API" width="600" height="315"></a>

Authenticate as in Queries and insights over the API. Schemas are in GET /v1/openapi.json under the web tag.

Overview

GET /v1/projects/{project_id}/web/overview?from=&to= (optional compare=true, host, properties, dims). Bots and internal traffic are left out.

Metric

Meaning

visitors, sessions, pageviews

distinct visitors, sessions that started in the range, pageviews

bounce_rate

share of sessions that are a bounce under the project's bounce rule

avg_session_duration_s

mean of last event time minus first event time, over all sessions

engaged_sessions, engagement_rate

sessions with 2+ pageviews, 10+ seconds on the clock, or 10+ seconds of engagement

avg_engagement_time_s

mean visible time on the page (from $pageleave), over all sessions; each session counts at most its own duration, so this never exceeds avg_session_duration_s

Breakdown

GET /v1/projects/{project_id}/web/breakdown?dimension=<value>&from=&to=&limit= returns rows ordered by visitors (limit default 100, max 1000). dimension is required and is one of:

page, entry_page, exit_page, referrer, channel, utm_source, utm_medium, utm_campaign, utm_term, utm_content, country, region, city, device, browser, os, host, language, resolution, browser_version, os_version, device_brand, device_model, visitor (new or returning), visit_number, hour, weekday, timezone.

Names are singular (page, not pages; device, not device_type; utm_source, not source). Sessions without a value for the dimension (no UTM tag, say) fall under an empty-string key. An unknown value answers 400 and lists the valid ones.

Updated