Skip to content
Data
Skill

/walkeros-understanding-mapping

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.

From plugin
walkeros
35122 skills

Claude Code

$ npx -y skills add elbwalker/walkerOS --skill walkeros-understanding-mapping --agent claude-code

SKILL.md

walkeros-understanding-mapping.SKILL.md
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.

Understanding walkerOS Mapping

Overview

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.

Core Functions

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 |

processEventMapping Flow

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

---

Configuration Hierarchy

Mapping.Config (Top Level)

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
}

Mapping.Config.include

`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' } },
      },
    },
  },
}

Mapping.Rule (Per Event)

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
}

`extend` and `remove` (patching package-shipped rules)

`@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:

  • **`extend`** (config layer): a partial rule deep-merged onto the

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`).

  • **`remove`** (output layer): dotted paths stripped from the produced payload

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"]
      }
    }
  }
}

Silent vs Ignore

Both flags control rule behavior but have different semantics:

  • `ignore: true`: the rule matched but **nothing happens**. No data transform,

no destination call, no side effects. Use for suppression.

  • `silent: true`: the rule matched and the destination `push()` **is** called.

`settings.identify`, `settings.revenue`, `settings.group`, etc. still run. Only the destination's default forwarding call (e.g. `track()`, `capture()`, `e

Read more
@elbwalker
Ships withwalkeros

From browser to BigQuery and ad platforms - warehouse-native, and ready for AI agents via MCP.

Stars on GitHub

Momentum

stars in total
351
Star history of elbwalker/walkerOS on GitHub, a chart by star-history.com

Other skills on walkeros.

walkeros-create-source

walkeros-create-source

Use when creating a new walkerOS source to capture events (browser source, dataLayer interception, server/HTTP source, webhook…

@elbwalker@elbwalkerInstall Skill

More skills from other plugins.

paddleocr-doc-parsing

paddleocr-doc-parsing

Use this skill to extract structured Markdown/JSON from PDFs and document images—tables with cell-level precision, formulas as…

paddleocr2mo93k
@paddlepaddle@paddlepaddleInstall Skill
context-loader
Auto-invoked

context-loader

Search memories from earlier Pi sessions in this repository. Use it when earlier work may already explain the code, error,…

mem02w69k
@mem0ai@mem0aiInstall Skill
analyzing-ai-citations

analyzing-ai-citations

Answer AI citation and answer engine optimization (AEO) questions in PostHog: whether AI answer engines (ChatGPT, Claude, and an…

posthog3w41k
@posthog@posthogInstall Skill

Questions about walkeros-understanding-mapping.

Which coding agents can use walkeros-understanding-mapping?
walkeros-understanding-mapping installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.