Marketing
For instructions on how to authenticate to use this endpoint, see API overview.
Endpoints
GET | |
GET | |
GET | |
GET | |
GET | |
GET | |
POST | |
GET |
Retrieve marketing analytics conversion goals
Read the configured conversion goals for the current project — each with its kind, target, last-30d count, integrated vs non-integrated split, and a misconfiguration flag. Read-only.
Required API key scopes
marketing_analytics:readResponse
Example request
GET /api /projects /:project_id /marketing_analytics /conversion_goalsExample response
Status 200 Configured conversion goals with last-30d performance
Retrieve marketing analytics data sources
Check the platform → data-warehouse side of every native marketing integration: connection state, sync recency, row counts, required-table status, and schema-mapping coverage. Read-only.
Required API key scopes
marketing_analytics:readQuery parameters
- source_typestringnull
Response
Example request
GET /api /projects /:project_id /marketing_analytics /data_sourcesExample response
Status 200 Per-integration data-source (sync) health
Retrieve marketing analytics diagnose
Aggregate data-source sync health, UTM attribution health, and conversion-goal config into a single per-integration diagnostic with recommended actions. Read-only.
Required API key scopes
marketing_analytics:readQuery parameters
- attribution_lookback_daysintegerDefault:
7 - include_conversion_goalsbooleanDefault:
true - source_typestringnull
Response
Example request
GET /api /projects /:project_id /marketing_analytics /diagnoseExample response
Status 200 End-to-end marketing analytics diagnostic
Retrieve marketing analytics explain conversion goal
Break down a single conversion goal's events over a period by event name, utm_source, and matched integration, with a small sample of events. Read-only.
Required API key scopes
marketing_analytics:readQuery parameters
- date_fromstringnull
- date_tostringnull
- goal_idstring
Response
Example request
GET /api /projects /:project_id /marketing_analytics /explain_conversion_goalExample response
Status 200 Per-event breakdown of a single conversion goal
Retrieve marketing analytics suggest conversion goals
Rank existing custom events as conversion-goal candidates by volume, UTM-tag coverage, and unique users, excluding system/autocaptured events. Read-only.
Required API key scopes
marketing_analytics:readQuery parameters
- min_countintegerDefault:
50 - top_nintegerDefault:
10
Response
Example request
GET /api /projects /:project_id /marketing_analytics /suggest_conversion_goalsExample response
Status 200 Ranked candidate events for conversion goals
Retrieve marketing analytics suggest utm mappings
Detect unmatched utm_source values from recent events and propose custom_source_mappings entries, alongside the full utm_source catalogue and current mappings. Read-only.
Required API key scopes
marketing_analytics:readQuery parameters
- lookback_daysintegerDefault:
90 - min_event_countintegerDefault:
10
Response
Example request
GET /api /projects /:project_id /marketing_analytics /suggest_utm_mappingsExample response
Status 200 Suggested utm_source → integration mappings
Create marketing analytics test mapping
Example request
POST /api /projects /:project_id /marketing_analytics /test_mappingExample response
Status 200 No response body
Retrieve marketing analytics utm audit
Cross-reference campaigns with spend from ad platforms against pageview events with UTM parameters to identify tracking issues.
Required API key scopes
marketing_analytics:readQuery parameters
- date_fromstringDefault:
-30d - date_tostringnull
Response
Example request
GET /api /projects /:project_id /marketing_analytics /utm_audit