Skip to main content

Analytics Privacy and Governance

Privacy and Governance

Customer-facing privacy controls and analytics governance patterns for compliant measurement.

Audience: Privacy, legal, and analytics leaders designing compliant data operations.

Critical: Public runtime endpoints enforce site verification, origin checks, and subscription validation via guard logic before serving sensitive analytics-related functionality.

Who This Page Is For

Use this page when defining how your organization collects analytics data under consent constraints while preserving operational reliability and auditability.

Quick Start (2-5 Minutes)

1

Audit consent posture

Review consent acceptance and impact using consent analytics endpoints.

GET /api/v1/analytics/consent/:siteId/stats
GET /api/v1/analytics/consent/:siteId/impact
2

Validate runtime protection model

Ensure public endpoints are called from verified site origins only.

GET /api/v1/public/sites/:siteKey/config
GET /api/v1/public/sites/:siteKey/tracking-config
3

Review identity/trait flows

Confirm identify and traits updates are intentional and policy-compliant.

POST /api/v1/public/sites/:siteKey/users/identify
POST /api/v1/public/sites/:siteKey/users/traits
4

Review consent write paths

Validate consent grant and withdrawal handling in runtime integration.

POST /api/v1/public/sites/:siteKey/consent
DELETE /api/v1/public/sites/:siteKey/consent
5

Define governance checklist

Set owner, review cadence, and escalation process for privacy changes.

Document policy, controls, and incident response ownership.

Key privacy-related endpoints

POST   /api/v1/public/sites/:siteKey/consent
DELETE /api/v1/public/sites/:siteKey/consent
POST   /api/v1/public/sites/:siteKey/users/identify
POST   /api/v1/public/sites/:siteKey/users/traits
GET    /api/v1/analytics/consent/:siteId/stats
GET    /api/v1/analytics/consent/:siteId/impact
GET    /api/v1/analytics/consent/compare

Required Fields / Minimum Payload

FieldRequiredTypeUsed by eventsDescription
siteKeyRequiredstringPublic consent/user endpointsPublic site identifier validated by guard.
origin / referer headersConditionalrequest headersPublic guarded endpointsMust match configured site domain policy.
consent payloadConditionalobjectPublic consent write endpointConsent categories/state payload from CMP integration.
startDate / endDateOptionalISO dateConsent analytics endpointsRange for governance and audit reporting.

Event or Endpoint Decision Matrix

ScenarioUse ThisWhy
Need runtime consent write/public/sites/:siteKey/consentCaptures consent state changes from storefront.
Need runtime consent removalDELETE /public/sites/:siteKey/consentSupports withdrawal and reset workflows.
Need consent impact reporting/analytics/consent/:siteId/impactQuantifies measurement effect of consent settings.
Need cross-site governance benchmark/analytics/consent/comparePortfolio-level policy monitoring.
Need infrastructure-level request safety modelPublic guards and rate-limit referenceDocuments site/origin/subscription protections.

Common Errors and Fixes

Public consent endpoints return forbidden

Cause: Origin mismatch or site verification/subscription failure.

Fix: Validate site domain config and request origin headers.

Consent analytics not matching CMP dashboard

Cause: Different date windows or category mapping differences.

Fix: Align category taxonomy and reporting intervals.

Identify calls blocked unexpectedly

Cause: Origin validation failure in public users endpoint.

Fix: Ensure identify calls originate from approved storefront domain.

Privacy review lacks audit trail

Cause: No structured change log for consent and tracking config updates.

Fix: Introduce release-note level logging for privacy-impacting changes.

Production Checklist

  • Consent collection and withdrawal flows are tested on production domain.Required
  • Consent category taxonomy is documented and versioned.Required
  • Public endpoint guard behavior is validated in security testing.Required
  • Consent analytics is reviewed on a fixed governance cadence.Required
  • Incident response plan exists for privacy-impacting regressions.Required

Next Steps