; Osano loads synchronously and exposes the window.Osano object immediately."},{"@type":"HowToStep","position":2,"text":"Listen for the consent decision event: window.Osano.cm.addEventListener('osano-cm-consent-saved', (consent) => { handleConsent(consent); }); the consent object contains a map of category names to ACCEPT, DENY, or INCOMPLETE."},{"@type":"HowToStep","position":3,"text":"Check current consent for a specific category synchronously via window.Osano.cm.getConsent().ANALYTICS (or MARKETING, PERSONALIZATION, etc.) before firing any tracking code."},{"@type":"HowToStep","position":4,"text":"Gate analytics calls: if (window.Osano.cm.getConsent().ANALYTICS === 'ACCEPT') { analytics.track(event); } else { queueForLater(event); } and replay the queue after the consent-saved event fires with ACCEPT."},{"@type":"HowToStep","position":5,"text":"For server-side consent reads, use the Osano Unified Consent REST API: GET https://api.osano.com/uc/v1/consents/{customerId} with your Osano API key in the X-Osano-Api-Key header to retrieve stored consent for a returning user."},{"@type":"HowToStep","position":6,"text":"Map Osano's category enum values to your internal consent flags and document the mapping in your consent management runbook."}],"about":"developers.osano.com","dateCreated":"2026-06-12T16:34:11.151Z"}
Integrate the Osano CMP JavaScript API to read consent status and gate analytics event firing
Add the Osano CMP script to your page <head>: <script src='https://cmp.osano.com/YOUR_CONFIG_ID/osano.js'></script>; Osano loads synchronously and exposes the window.Osano object immediately.
Listen for the consent decision event: window.Osano.cm.addEventListener('osano-cm-consent-saved', (consent) => { handleConsent(consent); }); the consent object contains a map of category names to ACCEPT, DENY, or INCOMPLETE.
Check current consent for a specific category synchronously via window.Osano.cm.getConsent().ANALYTICS (or MARKETING, PERSONALIZATION, etc.) before firing any tracking code.
Gate analytics calls: if (window.Osano.cm.getConsent().ANALYTICS === 'ACCEPT') { analytics.track(event); } else { queueForLater(event); } and replay the queue after the consent-saved event fires with ACCEPT.
For server-side consent reads, use the Osano Unified Consent REST API: GET https://api.osano.com/uc/v1/consents/{customerId} with your Osano API key in the X-Osano-Api-Key header to retrieve stored consent for a returning user.
Map Osano's category enum values to your internal consent flags and document the mapping in your consent management runbook.
Known gotchas
The INCOMPLETE state means the banner has loaded but the user has not yet interacted; do not treat INCOMPLETE as DENY — implement a separate hold queue rather than permanently suppressing events.
Osano consent categories are configurable and may not match the default names (ANALYTICS, MARKETING) if your organization has customized them in the Osano dashboard; always reference your specific configuration.
The Unified Consent REST API uses a separate API key from the CMP configuration ID; they are provisioned independently in the Osano account settings.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp