Set the workspace policy first
In Settings → Capture and retention, enable Require consent before capture if collection needs affirmative permission. The tracker reads the saved policy before it starts. The website’s consent manager owns the visitor’s choice and how that choice is presented.
Apply the current choice after loading
Read the current analytics choice when the tracker script has loaded and its consent API is available. Also subscribe to changes in your consent manager. Leave a pending or unknown choice pending. The two calls below belong in the corresponding confirmed choice handlers.
// In the confirmed analytics-allowed handler
window.OraamiConsent.grant()
// In the denied or withdrawn handler
await window.OraamiConsent.revoke()Handle return visits and changes
Read the latest choice again on every load. If the visitor changes their choice while the script is loading, apply the most recent one. Remove duplicate listeners when the application unmounts. Read consent from your manager rather than using the tracker’s effective capture state as a record of permission.
What happens on withdrawal?
Revocation stops capture, aborts uploads in progress and clears pending browser batches. Previously saved evidence has its own lifecycle. A workspace owner can use retention or submit a visitor deletion request for saved data.
Common questions
Does enabling approximate IP location grant analytics consent?
No. Network enrichment controls which network facts may be attached to eligible events. A site requiring consent still needs the visitor’s affirmative analytics choice.