Counts of $autocapture, $rageclick, and $dead_click events grouped by the element chain they occurred on, ordered by count. Defaults to all three event types; narrow with the include parameter.
Request
- Base URL: https://us.posthog.com
- URL: https://us.posthog.com/api/projects/{project_id}/elements/stats/
- Auth: HTTP bearer
Path parameters
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Query parameters
Comma-separated data attribute names (wildcards allowed, e.g. data-). When provided, each element's attributes map is filtered to matching attr__ keys, shrinking the response.
Start of the date range (e.g. -7d, 2024-01-01). Defaults to last 7 days.
End of the date range (e.g. 2024-01-31). Defaults to now.
When true, applies the project's internal-and-test-account filters to the underlying events. Pass the lowercase string true; other truthy spellings are ignored.
Event types to include: $autocapture, $rageclick, $dead_click. Defaults to all three. Accepts repeated parameters, a JSON array, or a comma-separated list.
Maximum rows per page
Pagination offset
JSON-encoded list of property filters to apply to the underlying events, e.g. [{"key": "$current_url", "value": "https://example.com/page"}] or [{"key": "email", "value": "@posthog.com", "operator": "icontains", "type": "person"}]. Supports event, person, cohort, element, and HogQL property filter types.
Sampling factor between 0 and 1
Response
Changes
No recorded changes to this operation across all 1 revision of this API.