Skip to content

Read stats & events

Facts reviewed:

First enable developer access and set OWLEYE_DEVELOPER_KEY in your server environment. Use the app’s Tracking ID in the URL.

Terminal window
curl --fail-with-body --get \
'https://api.owleye.dev/v1/developer/sites/owl_your_tracking_id/stats' \
--header "Authorization: Bearer $OWLEYE_DEVELOPER_KEY" \
--data-urlencode 'days=30'

Requires stats:read and Pro, Business, or Custom. days defaults to 7 and must be 1–90. The response includes totals, timeseries, top_pages, event_names, and dimension breakdowns. Query aggregates for charts instead of downloading every event. Actual results depend on retained data; no traffic produces empty results, not sample data.

Terminal window
curl --fail-with-body --get \
'https://api.owleye.dev/v1/developer/sites/owl_your_tracking_id/events' \
--header "Authorization: Bearer $OWLEYE_DEVELOPER_KEY" \
--data-urlencode 'days=7' \
--data-urlencode 'limit=500'

Requires events:read and Business or Custom. days defaults to 7 (1–90); limit defaults to 500 (1–5,000). The response contains data, site_id, and pagination.

Read both pagination.next_before and pagination.next_event_id from the response. If present, pass them together as before and before_event_id with the same days and limit. Stop when no next cursor is returned. The two-part cursor handles events with the same timestamp without skipping them.

Exports omit raw IPs, URL queries/fragments, and full custom payloads. They are not a full database dump. For exact response fields, use the OpenAPI explorer or download the JSON schema.

Keep one scoped key per integration, bound concurrency, honor rate limits, and redact authorization headers from logs. Developer requests are not authenticated with browser session cookies. Disabling developer access or revoking the key stops subsequent requests without changing your app’s browser SDK tracking.