Skip to main content

CMP sources

walkerOS provides ready-made source packages for popular Consent Management Platforms. Each source listens for CMP events and automatically calls elb('walker consent', state) — no manual event listener code needed.

CMPPackage
CookieFirst@walkeros/web-source-cmp-cookiefirst
CookiePro / OneTrust@walkeros/web-source-cmp-cookiepro
Usercentrics@walkeros/web-source-cmp-usercentrics

Conditional activation with require

Some sources and destinations shouldn't initialize right away — they may depend on consent status being resolved first, or need information provided by other sources (like session IDs). The require option solves this by deferring initialization until specific collector events have fired.

Add require to any source or destination config to hold it as pending until the listed events occur:

Loading...

In this example the CMP source initializes immediately and fires elb('walker consent', state) once the user makes a choice. That consent event unblocks the session source, the dataLayer source, and the GA4 destination — all at once.

How require works

  1. Sources and destinations with require are held as pending during initialization
  2. Each time a collector event fires (e.g., consent, session, user), the collector checks all pending items
  3. When all listed conditions are met, the source or destination initializes
  4. Destinations receive all previously queued events on activation — no data is lost

Key points

  • CMP sources must not have require — they need to initialize immediately to detect consent
  • Accepted values: any collector event type — "consent", "session", "user", "run", "config", "globals", etc.
  • AND logic: require: ["consent", "session"] waits for both events
  • Cascading: a CMP source fires consent → session source activates and fires session → a dataLayer source waiting for ["session"] activates next

How CMP sources work

  1. Detecting if the CMP is already loaded and reading existing consent
  2. Listening for CMP-specific events on consent changes
  3. Mapping CMP categories to walkerOS consent groups via categoryMap
  4. Calling elb('walker consent', state) with the mapped state

All CMP sources support explicitOnly (default: true) to filter out implicit/default consent and only process active user choices.

For more details on how consent works in walkerOS, see the consent management guide.

💡 Need Professional Support?
Need professional support with your walkerOS implementation? Check out our services.