walkeros-create-cmp-so…
A CMP source is a specialized walkerOS source that listens to a consent management platform's events and translates consent…
Use when transforming walkerOS events in the flow (source→collector or collector→destination), configuring data/map/loop/set/condition/policy, or using $code: syntax in JSON configs.
Claude Code
$ npx -y skills add elbwalker/walkerOS --skill walkeros-understanding-mapping --agent claude-code
Codex
$ npx skills add elbwalker/walkerOS --skill walkeros-understanding-mapping -a codex -y
Cursor
$ npx skills add elbwalker/walkerOS --skill walkeros-understanding-mapping -a cursor -y
Gemini CLI
$ npx skills add elbwalker/walkerOS --skill walkeros-understanding-mapping -a gemini-cli -y
GitHub Copilot
$ npx skills add elbwalker/walkerOS --skill walkeros-understanding-mapping -a github-copilot -y
OpenCode
$ npx skills add elbwalker/walkerOS --skill walkeros-understanding-mapping -a opencode -y
Windsurf
$ npx skills add elbwalker/walkerOS --skill walkeros-understanding-mapping -a windsurf -y
name: walkeros-understanding-mapping description: Use when transforming walkerOS events in the flow (source→collector or collector→destination), configuring data/map/loop/set/condition/policy, or using $code: syntax in JSON configs.
Mapping transforms data at multiple points in the walkerOS flow:
1. **Source → Collector**: Transform raw input (HTTP requests, dataLayer pushes) into walkerOS events 2. **Collector → Destination**: Transform walkerOS events into vendor-specific formats
**Core principle:** Mapping is the universal transformation layer. Same strategies work everywhere in the flow.
See [packages/core/src/mapping.ts](../../packages/core/src/mapping.ts) for implementation.
| Function | Purpose | | ----------------------------------------------- | ------------------------------------------- | | `getMappingEvent(event, rules)` | Find mapping rule for an event | | `getMappingValue(value, data, { collector })` | Transform a value using mapping config | | `processEventMapping(event, config, collector)` | Unified processing for sources/destinations |
1. Apply config.policy (modifies event) 2. Find matching rule via getMappingEvent() 3. Apply rule.policy (modifies event) 4. Transform config.data (global) 5. Check rule.ignore (short-circuits if true) 5b. Read rule.silent (informational - destination honors it) 6. Override event.name if rule.name 7. Transform rule.data (event-specific) 8. Add the include sections (rule.include ?? config.include; data wins) 9. Strip rule.remove paths from the produced data
---
interface Config {
consent?: Consent; // Required consent for ALL events
data?: Value; // Global data transformation
include?: string[]; // Event sections to flatten into context.data
policy?: Policy; // Pre-processing for ALL events
mapping?: Rules; // Event-specific rules
}`include` lists event sections whose fields are **added** to the data the destination receives (`PushContext.data`), after the rule's own `data` ran. Each field becomes a flat key named `<section>_<key>`: nested objects are joined with `_`, arrays stay whole, a `context` entry contributes its label. Sections: `data`, `globals`, `context`, `user`, `source`, `event` (`entity`, `action`, `id`, `timestamp`, `name`, `trigger`, `timing`), or `all` for every one of them. On a key conflict the produced `data` (the config-level `data` merged with the rule's) wins; `remove` runs after it. The runtime helper is `flattenIncludeSections` (in `packages/core/src/include.ts`).
Use this to forward whole sections without mapping each field. `include` is also available on `Mapping.Rule` (rule-level replaces config-level). `user` includes every user field, `email` among them, unhashed.
{
include: ['globals'],
mapping: {
page: {
view: {
// data: { page_title, globals_language, globals_currency, ... }
data: { map: { page_title: 'data.title' } },
},
},
},
}interface Rule {
name?: string; // Override event name
data?: Value; // Event-specific data transformation
include?: string[]; // Event sections to flatten into context.data (rule-level)
ignore?: boolean; // Skip this event entirely (no processing, no push)
silent?: boolean; // Process settings side effects, skip destination default push
policy?: Policy; // Event-specific pre-processing
condition?: Function; // Match condition (for arrays)
consent?: Consent; // Required in addition to config.consent for events this rule matches
settings?: unknown; // Custom event configuration
batch?: number | BatchOptions; // Own batch buffer (a number is the wait in ms)
extend?: RulePatch; // Config-layer merge onto a package-shipped default rule
remove?: string[]; // Output-layer: dotted paths stripped from the final payload
}`@walkeros/transformer-ga4` ships its own default mapping rules. A user rule at the same key normally replaces the default in full. Two keywords change that:
package-shipped default at init, before any event is evaluated. A `null` value clears an inherited field. Lets you add or override one field while keeping the rest. It has an effect only in `@walkeros/transformer-ga4`'s `settings.mapping`; in any other rule `walkeros validate` and the bundle reject it (`MAPPING_NO_OP`).
after evaluation, applied last. Useful for dropping PII or vendor-reserved fields without rewriting the full rule. Works in a destination's rules and in `@walkeros/transformer-ga4`'s `settings.mapping`.
A rule with **neither** keyword keeps the standard replace behavior.
See the [website mapping docs](../../website/docs/mapping/rule.mdx#patching-package-shipped-rules) for the authoritative reference and the GA4 example.
{
"settings": {
"mapping": {
"purchase": {
"extend": {
"data": { "map": { "affiliation": "params.ep.affiliation" } }
},
"remove": ["currency"]
}
}
}
}Both flags control rule behavior but have different semantics:
no destination call, no side effects. Use for suppression.
`settings.identify`, `settings.revenue`, `settings.group`, etc. still run. Only the destination's default forwarding call (e.g. `track()`, `capture()`, `e
From browser to BigQuery and ad platforms - warehouse-native, and ready for AI agents via MCP.
A CMP source is a specialized walkerOS source that listens to a consent management platform's events and translates consent…
Use when creating a new walkerOS destination to send events to a vendor or API (GA4/gtag, Meta/Facebook Pixel, Mixpanel,…
Use when creating a new walkerOS source to capture events (browser source, dataLayer interception, server/HTTP source, webhook…
| Symptom | Likely Cause | Check | | ---------------------------------- | ---------------------------- |…
Read [understanding-mapping](../walkeros-understanding-mapping/SKILL.md) first for core concepts.
Use this skill to extract structured Markdown/JSON from PDFs and document images—tables with cell-level precision, formulas as…
Estimates intracellular metabolic fluxes from steady-state carbon-13 isotope-tracing measurements using validated atom maps,…