-
Notifications
You must be signed in to change notification settings - Fork 479
Open
Labels
Description
Description
Create a new endpoint GET /v1/analytics/conversions that returns one row per conversion definition with its totals and top 3 attributed content items.
Improvement plan: https://docs.google.com/document/d/1hVfIurPqAJJ1PN1EalmvrWXnGNt5sY21MI-409lrXpU/edit?tab=t.klqavlz4cis7#heading=h.8vek9yxwq8yt
Parent epic: #35048
Query Parameters
| Param | Required | Description |
|---|---|---|
siteId |
✅ | dotCMS site identifier |
environment |
✅ | Cluster/environment identifier |
from + to OR range |
✅ | Time range — absolute or relative |
conversionName |
❌ | Filter by conversion name |
orderBy |
❌ | conversionName, totalConversions, convRate |
orderDir |
❌ | asc or desc |
page |
❌ | Page number |
pageSize |
❌ | Results per page |
Headers
X-Customer-Id, X-Signature (HMAC-SHA256)
Time range rules
- If
from/topresent → use them, ignorerange - Else if
rangepresent → computefrom/to
Response shape
{
"params": { "siteId": "...", "environment": "...", "from": "...", "to": "..." },
"pagination": { "page": 1, "pageSize": 50, "totalPages": 2, "totalItems": 60 },
"data": [
{
"conversionName": "download",
"totalConversions": 320,
"convRate": 42.15,
"topAttributedContent": [
{
"identifier": "/landing/product",
"title": "Product Landing Page",
"eventType": "page_view",
"attributionCount": 180,
"events": 890,
"attributionRate": 20.22
}
]
}
]
}Acceptance Criteria
-
GET /v1/analytics/conversions/summaryendpoint created - Mandatory params validated:
siteId,environment, time range — returns400when missing -
conversionNameoptional filter works correctly -
orderBysupports all three values;orderDirdefaults todesc - Pagination works: correct
totalPages/totalItemsin response - Each row includes up to top 3 attributed content items with full attribution fields
- Time range rules applied: absolute takes precedence over relative
-
X-Customer-Idenforces row-level data isolation -
X-Signaturevalidated (HMAC-SHA256) - Response matches the documented JSON shape
Additional Context
- Source task: Conversion dashboard endpoints / Conversion Endpoint Detail changes
- Requires Phase 2 completion — blocked by: Update ClickHouse Materialized Views after lookup table removal #35062
- Related: New endpoint: GET /v1/analytics/content/attribution #35076 (
content/attributionendpoint feeds thetopAttributedContentlogic) - Related branch:
issue-34849-Add-dotCMS-Analytics-Proxy-Endpoint-for-/v1/analytics/-to-dot-ca-event-manager
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
New