Analytics

Run a read-only analytics query for a project

Changed on
post/analytics/query

Request

  • Base URL
    https://api.replo.app/v1
  • Auth
    HTTP bearer

Query parameters

projectIdstring uuid required

Headers

Replo-Api-Version'2026-10-29' required

The public API version to use for this request.

Request body

querystring required

Run a read-only analytics query for a project.

Rules:

  • Use SELECT or WITH queries only.
  • Do not add project or namespace filters; project scoping is enforced server-side.
  • Use session_attribution(since, until) for cross-project session and attributed revenue; stored computed metrics and page rollups are project-local.
  • Session revenue repeats across visited pages: deduplicate by subject for totals. Attributed revenue splits credit across eligible pageviews before domain filters.
  • Aggregate-state rollup columns must use the matching ClickHouse merge function, such as countMerge, uniqMerge, or sumMerge, and queries must group by selected dimensions.
  • Maximum execution time: 60 seconds.
  • Maximum result rows: 100000.

Queryable tables, their columns, and the external metric views for connected integrations are listed at https://docs.replo.app/api-reference/analytics-tables.

External metric views take named since/until dates (YYYY-MM-DD, inclusive); the views that also need settings JSON or another argument say so on that page. Credentials and project scope are injected server-side: never supply auth_token or project_id. In MCP, call get_integration_status first for connection IDs, setup links, and supported views. Missing or misconfigured integrations can return zero rows: do not report that as measured zero activity. Use provider-specific tools for metric/property discovery and detailed provider-native reports. External results can be cached for up to eight hours, and report views cap provider results at 10,000 rows; narrow dates or dimensions if exceeded. Match currencies, reporting timezones, and attribution definitions before combining sources.

Response

Run a read-only analytics query for a project

rowCountinteger required
dataobject[] required

Changes

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • breaking

      removed the enum value 2026-10-05 from the header request parameter Replo-Api-Version

    • info

      added the new enum value 2026-10-29 to the header request parameter Replo-Api-Version