Consent Analytics
Consent Analytics
Measure consent acceptance behavior and quantify consent impact on analytics and conversion visibility.
Audience: Privacy, legal-tech, and growth analytics teams balancing compliance and measurement quality.
Critical: Primary stats endpoint is /api/v1/analytics/consent/:siteId/stats.
Who This Page Is For
Use this page when you need to understand consent behavior trends, category-level impact, cross-site comparisons, and simulation outcomes.
Quick Start (2-5 Minutes)
Get consent stats
Load baseline acceptance/rejection metrics for a site.
GET /api/v1/analytics/consent/:siteId/stats?startDate=2026-01-01&endDate=2026-01-31Get consent trends
Track trend by interval to identify banner behavior shifts.
GET /api/v1/analytics/consent/:siteId/trends?interval=dayGet conversion impact
Estimate conversion visibility impact by consent category.
GET /api/v1/analytics/consent/:siteId/impact?consentCategory=analyticsRun simulation
Test hypothetical consent settings before rollout.
POST /api/v1/analytics/consent/:siteId/simulateCompare across sites
Benchmark consent performance across portfolio.
GET /api/v1/analytics/consent/compare?siteIds=SITE_A,SITE_BConsent analytics endpoints
GET /api/v1/analytics/consent/:siteId/stats
GET /api/v1/analytics/consent/:siteId/trends
GET /api/v1/analytics/consent/:siteId/impact
GET /api/v1/analytics/consent/:siteId/categories
POST /api/v1/analytics/consent/:siteId/simulate
GET /api/v1/analytics/consent/:siteId/export
GET /api/v1/analytics/consent/compareRequired Fields / Minimum Payload
| Field | Required | Type | Used by events | Description |
|---|---|---|---|---|
siteId | Conditional | uuid | All site-scoped consent endpoints | Required except compare endpoint when comparing org sites by default. |
startDate / endDate | Optional | ISO date | stats/trends/impact/categories/export/compare | Time boundary for aggregation. |
interval | Optional | string | trends | Trend granularity selection. |
consentCategory | Optional | necessary | analytics | marketing | preferences | impact | Impact focus category. |
granularEnabled / requiredCategories / timeoutMs | Conditional | simulate payload | simulate | Hypothetical consent settings for simulation. |
Event or Endpoint Decision Matrix
| Scenario | Use This | Why |
|---|---|---|
| Need baseline consent KPIs | /analytics/consent/:siteId/stats | Primary consent summary endpoint. |
| Need time-based movement | /analytics/consent/:siteId/trends | Identifies trend inflections and rollout effects. |
| Need analytics loss estimation | /analytics/consent/:siteId/impact | Quantifies impact of category-level opt-out rates. |
| Need hypothetical policy evaluation | /analytics/consent/:siteId/simulate | Estimate outcome before changing live settings. |
| Need portfolio benchmark | /analytics/consent/compare | Cross-site comparison for governance reporting. |
Common Errors and Fixes
Stats endpoint appears empty
Cause: Date window has low consent event volume or tracking not configured.
Fix: Broaden date range and validate consent event ingestion.
Impact output not actionable
Cause: No consentCategory filter applied.
Fix: Set consentCategory to isolate analytics or marketing effect.
Compare endpoint unexpected results
Cause: siteIds omitted and org contains many heterogeneous sites.
Fix: Pass explicit siteIds for controlled benchmark sets.
Simulation differs from production behavior
Cause: Simulation assumptions diverge from actual CMP runtime settings.
Fix: Align simulation payload with current CMP configuration contract.
Production Checklist
- Consent stats are tracked per site with consistent date windows.Required
- Consent trend monitoring includes release markers for banner changes.Required
- Simulation is run before major consent-policy changes.Required
- Cross-site comparisons use explicit site cohorts.Required
- Consent analytics outputs are tied to privacy governance cadence.Required