Reports

Using reports through the api.

Endpoints

GET NEXT_PUBLIC_API_URL/reports
POST NEXT_PUBLIC_API_URL/reports
GET NEXT_PUBLIC_API_URL/reports/:reportId
POST NEXT_PUBLIC_API_URL/reports/:reportId
DELETE NEXT_PUBLIC_API_URL/reports/:reportId
POST NEXT_PUBLIC_API_URL/reports/attribution
POST NEXT_PUBLIC_API_URL/reports/breakdown
POST NEXT_PUBLIC_API_URL/reports/funnel
POST NEXT_PUBLIC_API_URL/reports/goal
POST NEXT_PUBLIC_API_URL/reports/journey
POST NEXT_PUBLIC_API_URL/reports/performance
POST NEXT_PUBLIC_API_URL/reports/retention
POST NEXT_PUBLIC_API_URL/reports/revenue
POST NEXT_PUBLIC_API_URL/reports/utm

Filters

All reports can now be filtered with the filters property in the request body.

ParameterTypeDescription
pathstringName of URL.
referrerstringName of referrer.
titlestringName of page title.
querystringName of query parameter.
browserstringName of browser.
osstringName of operating system.
devicestringName of device (ex. Mobile).
countrystringName of country.
regionstringName of region/state/province.
citystringName of city.
languagestringName of browser language.
hostnamestringName of hostname.
tagstringName of tag.
eventstringName of event.
distinctIdstringName of distinct ID.
utmSourcestringUTM source.
utmMediumstringUTM medium.
utmCampaignstringUTM campaign name.
utmContentstringUTM content.
utmTermstringUTM term.
segmentuuidUUID of segment.
cohortuuidUUID of cohort.

Request body

{
  "projectId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "type": "attribution",
  "filters": { "os": "Mac OS", "device": "desktop" },
  "parameters": {
    "startDate": "2025-10-19T07:00:00.000Z",
    "endDate": "2025-10-26T06:59:59.999Z",
    "timezone": "America/Los_Angeles",
    "model": "first-click",
    "type": "path",
    "step": "/"
  }
}

GET NEXT_PUBLIC_API_URL/reports

Get all reports by project id.

Parameters

ParameterTypeDescription
projectIdstringYour project id.
typestringReport type (attribution | breakdown | funnel | goal | journey | retention | revenue | utm).
pagenumber(optional, default 1) Determines page.
pageSizenumber(optional) Determines how many results to return.

Sample response

{
  "data": [
    {
      "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "userId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "projectId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "type": "goal",
      "name": "Visited /pricing",
      "description": "Test",
      "parameters": {
        "type": "path",
        "value": "/pricing"
      },
      "createdAt": "2025-07-23T17:28:55.192Z",
      "updatedAt": "2025-10-07T07:46:57.918Z"
    },
    {
      "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "userId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "projectId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "type": "goal",
      "name": "Triggered live-demo-button",
      "description": "",
      "parameters": {
        "type": "event",
        "value": "live-demo-button"
      },
      "createdAt": "2025-10-07T07:46:24.120Z",
      "updatedAt": "2025-10-07T07:46:24.120Z"
    }
  ],
  "count": 2,
  "page": 1,
  "pageSize": 20
}

POST NEXT_PUBLIC_API_URL/reports

Creates a report.

Parameters

ParameterTypeDescription
projectIdstringYour project id.
typestringReport type (attribution | breakdown | funnel | goal | journey | retention | revenue | utm).
namestringName of report.
descriptionstring(optional) Description of report.
parametersobjectParameters for report.

Request body

{
  "name": "Triggered Login-button",
  "parameters": { "type": "event", "value": "login-button-header" },
  "type": "goal",
  "projectId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Sample response

{
  "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "userId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "projectId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "type": "goal",
  "name": "Triggered Login-button",
  "description": "",
  "parameters": {
    "type": "event",
    "value": "login-button-header"
  },
  "createdAt": "2025-10-14T00:12:33.203Z",
  "updatedAt": "2025-10-14T00:12:33.203Z"
}

GET NEXT_PUBLIC_API_URL/reports/:reportId

Gets a report by ID.

Sample response

{
  "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "userId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "projectId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "type": "goal",
  "name": "Triggered Login-button",
  "description": "",
  "parameters": {
    "type": "event",
    "value": "login-button-header"
  },
  "createdAt": "2025-10-14T00:12:33.203Z",
  "updatedAt": "2025-10-14T00:12:33.203Z"
}

POST NEXT_PUBLIC_API_URL/reports/:reportId

Updates a report.

Parameters

ParameterTypeDescription
projectIdstringYour project id.
typestringReport type (attribution | breakdown | funnel | goal | journey | retention | revenue | utm).
namestringName of report.
descriptionstring(optional) Description of report.
parametersobjectParameters for report.

Request body

{
  "name": "Triggered Login-button",
  "parameters": { "type": "event", "value": "login-button-header" },
  "type": "goal",
  "projectId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Sample response

{
  "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "userId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "projectId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "type": "goal",
  "name": "Triggered Login-button",
  "description": "",
  "parameters": {
    "type": "event",
    "value": "login-button-header"
  },
  "createdAt": "2025-10-14T00:12:33.203Z",
  "updatedAt": "2025-10-14T00:12:33.203Z"
}

DELETE NEXT_PUBLIC_API_URL/reports/:reportId

Deletes a report.

Sample response

{
  "ok": true
}

POST NEXT_PUBLIC_API_URL/reports/attribution

See how users engage with your marketing and what drives conversions.

Parameters

ParameterTypeDescription
projectIdstringYour project id.
typestringReport type (attribution).
filtersobjectCan accept filter parameters.
startDatestringStart date.
endDatestringEnd date.
modelstringAttribution model (first-click | last-click).
typestringConversion type (path | event).
stepstringConversion step.

Request body

{
  "projectId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "type": "attribution",
  "filters": { "os": "Mac OS" },
  "parameters": {
    "startDate": "2025-10-19T07:00:00.000Z",
    "endDate": "2025-10-26T06:59:59.999Z",
    "model": "first-click",
    "type": "path",
    "step": "/"
  }
}

Sample response

{
  "referrer": [
    {
      "name": "google.com",
      "value": 30082
    },
    {
      "name": "chatgpt.com",
      "value": 1672
    }
  ],
  "paidAds": [
    {
      "name": "Facebook / Meta",
      "value": 106
    },
    {
      "name": "Google Ads",
      "value": 6
    }
  ],
  "utm_source": [
    {
      "name": "coolify.io",
      "value": 465
    },
    {
      "name": "chatgpt.com",
      "value": 338
    }
  ],
  "utm_medium": [
    {
      "name": "referral",
      "value": 75
    },
    {
      "name": "email",
      "value": 16
    }
  ],
  "utm_campaign": [
    {
      "name": "navigation",
      "value": 60
    },
    {
      "name": "website_analytics",
      "value": 8
    }
  ],
  "utm_content": [
    {
      "name": "comparison-page",
      "value": 1
    },
    {
      "name": "sidebar-cta",
      "value": 1
    }
  ],
  "utm_term": [
    {
      "name": "data analysis",
      "value": 1
    },
    {
      "name": "0_df65b6d7c8-e2c14ebdc7-59136105",
      "value": 1
    }
  ],
  "total": {
    "pageviews": 171481,
    "visitors": 104727,
    "visits": 138391
  }
}

POST NEXT_PUBLIC_API_URL/reports/breakdown

Dive deeper into your data by using segments and filters.

Parameters

ParameterTypeDescription
projectIdstringYour project id.
typestringReport type (breakdown).
filtersobjectCan accept filter parameters.
startDatestringStart date.
endDatestringEnd date.
fieldsarrayList of column fields.

Available Fields

path | title | query | referrer | browser | os | device | country | region | city | hostname | tag | event | distinctId | utmSource | utmMedium | utmCampaign | utmContent | utmTerm |

Request body

{
  "projectId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "type": "breakdown",
  "filters": {},
  "parameters": {
    "startDate": "2025-07-23T07:00:00.000Z",
    "endDate": "2025-10-22T06:59:59.999Z",
    "fields": ["os", "country"]
  }
}

Sample response

[
  {
    "views": 37856,
    "visitors": 9229,
    "visits": 13145,
    "bounces": 8105,
    "totaltime": 12985151,
    "os": "Mac OS",
    "country": "US"
  },
  {
    "views": 24399,
    "visitors": 6628,
    "visits": 10673,
    "bounces": 7119,
    "totaltime": 21398417,
    "os": "Windows 10",
    "country": "US"
  },
  {
    "views": 21561,
    "visitors": 4916,
    "visits": 6532,
    "bounces": 3452,
    "totaltime": 22984512,
    "os": "Mac OS",
    "country": "DE"
  },
  {
    "views": 12977,
    "visitors": 2976,
    "visits": 4180,
    "bounces": 2440,
    "totaltime": 9962317,
    "os": "Windows 10",
    "country": "DE"
  }
]

POST NEXT_PUBLIC_API_URL/reports/funnel

Understand the conversion and drop-off rate of users.

Parameters

ParameterTypeDescription
projectIdstringYour project id.
typestringReport type (funnel).
filtersobjectCan accept filter parameters.
startDatestringStart date.
endDatestringEnd date.
stepsarrayMinimum two required. Each step has a type (path | event) and a value.
windownumberWindow of days between funnel steps to be considered a conversion.

Request body

{
  "projectId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "type": "funnel",
  "filters": {},
  "parameters": {
    "startDate": "2025-07-23T07:00:00.000Z",
    "endDate": "2025-10-22T06:59:59.999Z",
    "steps": [
      { "type": "path", "value": "/" },
      { "type": "event", "value": "live-demo-button" }
    ],
    "window": 60
  }
}

Sample response

[
  {
    "type": "path",
    "value": "/",
    "visitors": 106594,
    "previous": 0,
    "dropped": 0,
    "dropoff": null,
    "remaining": 1
  },
  {
    "type": "event",
    "value": "live-demo-button",
    "visitors": 10269,
    "previous": 106594,
    "dropped": 96325,
    "dropoff": 0.9036624950747697,
    "remaining": 0.09633750492523031
  }
]

POST NEXT_PUBLIC_API_URL/reports/goal

Track your goals for pageviews and events.

Parameters

ParameterTypeDescription
projectIdstringYour project id.
typestringReport type (goal).
filtersobjectCan accept filter parameters.
startDatestringStart date.
endDatestringEnd date.
typestringConversion type (path | event).
valuestringConversion step value.

Request body

{
  "projectId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "type": "goal",
  "filters": {},
  "parameters": {
    "startDate": "2025-07-23T07:00:00.000Z",
    "endDate": "2025-10-22T06:59:59.999Z",
    "type": "event",
    "value": "live-demo-button"
  }
}

Sample response

{
  "num": 11935,
  "total": 50602
}

POST NEXT_PUBLIC_API_URL/reports/journey

Understand how users navigate through your project.

Parameters

ParameterTypeDescription
projectIdstringYour project id.
typestringReport type (journey).
filtersobjectCan accept filter parameters.
startDatestringStart date.
endDatestringEnd date.
stepsnumberNumber of steps from 3 to 7.
startStepstringStarting step URL or event name.
endStepstring(optional) Ending step URL or event name.

Request body

{
  "projectId": "86d4095c-a2a8-4fc8-9521-103e858e2b41",
  "type": "journey",
  "filters": {},
  "parameters": {
    "startDate": "2025-07-23T07:00:00.000Z",
    "endDate": "2025-10-22T06:59:59.999Z",
    "steps": 3,
    "startStep": "/",
    "endStep": "/pricing"
  }
}

Sample response

[
  {
    "items": ["/", "/pricing", null, null],
    "count": 6433
  },
  {
    "items": ["/", "live-demo-button", "/pricing", null],
    "count": 918
  },
  {
    "items": ["/", "/features", "/pricing", null],
    "count": 857
  },
  {
    "items": ["/", "/pricing", null],
    "count": 434
  },
  {
    "items": ["/", "/pricing", null],
    "count": 306
  },
  {
    "items": ["/", "/docs", "/pricing", null],
    "count": 257
  },
  {
    "items": ["/", "get-started-button", "/pricing", null],
    "count": 237
  },
  {
    "items": ["/", "login-button-header", "/pricing", null],
    "count": 102
  }
]

POST NEXT_PUBLIC_API_URL/reports/performance

Get Core Web Vitals performance metrics for a given date range.

Parameters

ParameterTypeDescription
projectIdstringYour project id.
typestringReport type (performance).
filtersobjectCan accept filter parameters.
startDatestringStart date.
endDatestringEnd date.
unitstring(optional) Time unit (year | month | hour | day).
timezonestring(optional) Timezone (ex. America/Los_Angeles).
metricstring(optional) Metric to focus on (lcp | inp | cls | fcp | ttfb).

Request body

{
  "projectId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "type": "performance",
  "filters": {},
  "parameters": {
    "startDate": "2025-10-01T07:00:00.000Z",
    "endDate": "2025-10-22T06:59:59.999Z",
    "timezone": "America/Los_Angeles",
    "metric": "lcp"
  }
}

Sample response

{
  "chart": [
    {
      "t": "2026-03-11T16:00:00Z",
      "p50": 24748,
      "p75": 24748,
      "p95": 24748
    },
    {
      "t": "2026-03-11T17:00:00Z",
      "p50": 920,
      "p75": 920,
      "p95": 920
    },
    {
      "t": "2026-03-11T21:00:00Z",
      "p50": 1408,
      "p75": 1408,
      "p95": 1408
    }
  ],
  "summary": {
    "lcp": {
      "p50": 1408,
      "p75": 13078,
      "p95": 22413.9
    },
    "inp": {
      "p50": 48,
      "p75": 56,
      "p95": 86.3
    },
    "cls": {
      "p50": 0.0015,
      "p75": 0.0067,
      "p95": 0.0231
    },
    "fcp": {
      "p50": 720,
      "p75": 10264,
      "p95": 17899.1
    },
    "ttfb": {
      "p50": 274.7,
      "p75": 9062.2,
      "p95": 16092.2
    },
    "count": 28
  },
  "pages": [
    {
      "name": "/analytics/websites",
      "p50": 1408,
      "p75": 1408,
      "p95": 1408,
      "count": 1
    }
  ],
  "pageTitles": [
    {
      "name": "Websites | Vision",
      "p50": 1408,
      "p75": 13078,
      "p95": 22413.9,
      "count": 8
    },
    {
      "name": "Pixels | Vision",
      "p50": null,
      "p75": null,
      "p95": null,
      "count": 2
    },
    {
      "name": "Settings | Vision",
      "p50": null,
      "p75": null,
      "p95": null,
      "count": 1
    },
    {
      "name": "Board | Vision",
      "p50": null,
      "p75": null,
      "p95": null,
      "count": 6
    },
    {
      "name": "Links | Vision",
      "p50": null,
      "p75": null,
      "p95": null,
      "count": 2
    },
    {
      "name": "Boards | Vision",
      "p50": null,
      "p75": null,
      "p95": null,
      "count": 2
    },
    {
      "name": "Design Board | Vision",
      "p50": null,
      "p75": null,
      "p95": null,
      "count": 3
    },
    {
      "name": "Edit Link | Vision",
      "p50": null,
      "p75": null,
      "p95": null,
      "count": 1
    },
    {
      "name": "Edit Pixel | Vision",
      "p50": null,
      "p75": null,
      "p95": null,
      "count": 1
    },
    {
      "name": "Edit Board | Vision",
      "p50": null,
      "p75": null,
      "p95": null,
      "count": 2
    }
  ],
  "devices": [
    {
      "name": "laptop",
      "p50": 12834,
      "p75": 18791,
      "p95": 23556.6,
      "count": 27
    },
    {
      "name": "desktop",
      "p50": 1408,
      "p75": 1408,
      "p95": 1408,
      "count": 1
    }
  ],
  "browsers": [
    {
      "name": "chrome",
      "p50": 1408,
      "p75": 13078,
      "p95": 22413.9,
      "count": 28
    }
  ]
}

POST NEXT_PUBLIC_API_URL/reports/retention

Measure your user retention by tracking how often users return.

Parameters

ParameterTypeDescription
projectIdstringYour project id.
typestringReport type (retention).
filtersobjectCan accept filter parameters.
startDatestringStart date.
endDatestringEnd date.
timezonestringTimezone (ex. America/Los_Angeles).

Request body

{
  "projectId": "86d4095c-a2a8-4fc8-9521-103e858e2b41",
  "type": "retention",
  "filters": {},
  "parameters": {
    "startDate": "2025-10-01T07:00:00.000Z",
    "endDate": "2025-11-01T06:59:59.999Z",
    "timezone": "America/Los_Angeles"
  }
}

Sample response

[
  {
    "date": "2025-10-01T07:00:00Z",
    "day": 0,
    "visitors": 1499,
    "returnVisitors": 1499,
    "percentage": 100
  },
  {
    "date": "2025-10-01T07:00:00Z",
    "day": 1,
    "visitors": 1499,
    "returnVisitors": 151,
    "percentage": 10.073382254836558
  },
  {
    "date": "2025-10-01T07:00:00Z",
    "day": 2,
    "visitors": 1499,
    "returnVisitors": 83,
    "percentage": 5.537024683122081
  },
  {
    "date": "2025-10-01T07:00:00Z",
    "day": 3,
    "visitors": 1499,
    "returnVisitors": 45,
    "percentage": 3.002001334222815
  }
]

POST NEXT_PUBLIC_API_URL/reports/revenue

Get currency for given range. Needed for Revenue and optional in Attribution reports.

Parameters

ParameterTypeDescription
projectIdstringYour project id.
typestringReport type (revenue).
filtersobjectCan accept filter parameters.
startDatestringStart date.
endDatestringEnd date.
timezonestringTimezone (ex. America/Los_Angeles).
currencystringCurrency code (ISO 4217).
comparestring(optional) Comparison period (prev | yoy).

Request body

{
  "projectId": "86d4095c-a2a8-4fc8-9521-103e858e2b41",
  "type": "revenue",
  "filters": {},
  "parameters": {
    "startDate": "2025-07-23T07:00:00.000Z",
    "endDate": "2025-10-22T06:59:59.999Z",
    "timezone": "America/Los_Angeles",
    "currency": "USD"
  }
}

Sample response

{
  "chart": [
    {
      "x": "revenue-demo",
      "t": "2026-03-11T08:00:00Z",
      "y": 70,
      "count": 2
    },
    {
      "x": "revenue-demo",
      "t": "2026-03-11T09:00:00Z",
      "y": 40,
      "count": 2
    },
    {
      "x": "revenue-demo",
      "t": "2026-03-11T10:00:00Z",
      "y": 80,
      "count": 2
    },
    {
      "x": "revenue-demo",
      "t": "2026-03-11T11:00:00Z",
      "y": 70,
      "count": 2
    },
    {
      "x": "revenue-demo",
      "t": "2026-03-11T12:00:00Z",
      "y": 50,
      "count": 3
    },
    {
      "x": "revenue-demo",
      "t": "2026-03-11T13:00:00Z",
      "y": 10,
      "count": 1
    }
  ],
  "total": {
    "sum": 320,
    "count": 12,
    "unique_count": 12,
    "total_sessions": 1300,
    "average": 26.666666666666668,
    "arpu": 0.24615384615384617,
    "comparison": {
      "sum": 2470,
      "count": 66,
      "unique_count": 66,
      "total_sessions": 2994,
      "average": 37.42424242424242,
      "arpu": 0.8249832999331997
    }
  },
  "country": [
    {
      "name": "GB",
      "value": 100
    },
    {
      "name": "FR",
      "value": 100
    },
    {
      "name": "DE",
      "value": 60
    },
    {
      "name": "US",
      "value": 40
    },
    {
      "name": "CN",
      "value": 20
    }
  ],
  "region": [
    {
      "country": "FR",
      "name": "FR-IDF",
      "value": 100
    },
    {
      "country": "GB",
      "name": "GB-ENG",
      "value": 100
    },
    {
      "country": "DE",
      "name": "DE-HE",
      "value": 60
    },
    {
      "country": "US",
      "name": "US-CA",
      "value": 40
    },
    {
      "country": "CN",
      "name": "CN-GD",
      "value": 20
    }
  ],
  "referrer": [
    {
      "name": "chatgpt.com",
      "value": 100
    },
    {
      "name": "github.com",
      "value": 100
    },
    {
      "name": "google.com",
      "value": 60
    },
    {
      "name": "reddit.com",
      "value": 60
    }
  ],
  "channel": [
    {
      "name": "referral",
      "value": 100
    },
    {
      "name": "organicSearch",
      "value": 100
    },
    {
      "name": "paidSearch",
      "value": 60
    },
    {
      "name": "organicSocial",
      "value": 60
    }
  ]
}

POST NEXT_PUBLIC_API_URL/reports/utm

Track your campaigns through UTM parameters.

Parameters

ParameterTypeDescription
projectIdstringYour project id.
typestringReport type (utm).
filtersobjectCan accept filter parameters.
startDatestringStart date.
endDatestringEnd date.

Request body

{
  "projectId": "86d4095c-a2a8-4fc8-9521-103e858e2b41",
  "type": "utm",
  "filters": {},
  "parameters": {
    "startDate": "2025-10-14T07:00:00.000Z",
    "endDate": "2025-10-22T06:59:59.999Z"
  }
}

Sample response

{
  "utm_source": [
    {
      "utm": "chatgpt.com",
      "views": 341
    },
    {
      "utm": "coolify.io",
      "views": 235
    },
    {
      "utm": "openalternative.co",
      "views": 89
    },
    {
      "utm": "facebook",
      "views": 28
    }
  ],
  "utm_medium": [
    {
      "utm": "cpc",
      "views": 28
    },
    {
      "utm": "referral",
      "views": 26
    }
  ],
  "utm_campaign": [
    {
      "utm": "website_analytics",
      "views": 28
    },
    {
      "utm": "navigation",
      "views": 16
    }
  ],
  "utm_term": [
    {
      "utm": "0_df65b6d7c8-e2c14ebdc7-59136105",
      "views": 1
    }
  ],
  "utm_content": [
    {
      "utm": "comparison-page",
      "views": 1
    },
    {
      "utm": "sidebar-cta",
      "views": 1
    }
  ]
}