Skip to content
Skills Library
Data & analytics · Building & coding

rum-tracking

/rum-tracking

Guides product analytics and RUM event tracking in web and React Native apps — what to capture, what is noise or PII, naming, tracking plans, compliance, and clean implement / audit / remove. Triggers on "track this event", "add analytics", "what should I track", "is this PII", "/rum-tracking".

Licence
MIT
Last repository change
27.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
15
Scripts
1
HTML comments
0
URLs in SKILL.md
1
Deprecation

No signals detected. Repository changed on 27.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What to check before installing
  • 1 scripts in this package. Review them before installing, as Claude may execute them.

Scripts: templates/analytics-wrapper.template.ts

What it does and when to use it

Guides product analytics and RUM event tracking in web and React Native apps — what to capture, what is noise or PII, naming, tracking plans, compliance, and clean implement / audit / remove. Triggers on "track this event", "add analytics", "what should I track", "is this PII", "/rum-tracking".

Triggers from the description

track this eventadd analyticswhat should I trackis this PII

Arguments

/rum-tracking [guide|implement|audit|remove|plan] [<target>]
Original author description

Guides product analytics and RUM event tracking in web and React Native apps — what to capture, what is noise or PII, naming, tracking plans, compliance, and clean implement / audit / remove. Triggers on "track this event", "add analytics", "what should I track", "is this PII", "/rum-tracking".

How it works

  1. Mode Detection
  2. Workflow by Mode
  3. Required Reading by Mode
  4. Core Principles
  5. Anti-patterns (one-liners)
  6. Definition of Done
Original SKILL.md headings · 185 lines, 1,014 words
SKILL.md preview
---
name: rum-tracking
description: >
  Guides product analytics and RUM event tracking in web and React Native apps —
  what to capture, what is noise or PII, naming, tracking plans, compliance, and
  clean implement / audit / remove. Triggers on "track this event", "add
  analytics", "what should I track", "is this PII", "/rum-tracking".
argument-hint: '[guide|implement|audit|remove|plan] [<target>]'
license: MIT
metadata:
  author: mthines
  version: '1.0.0'
  workflow_type: advisory
  tags:
    - rum
    - analytics
    - tracking
    - product-analytics
    - opentelemetry
    - pii
    - gdpr
    - react
    - react-native
    - dash0
---

# RUM Tracking

Guides product-analytics and RUM event tracking for web (React/Next.js)
and mobile (React Native/Expo) apps.
Decides what to capture, what to drop, what's PII, and how to add, audit,
update, and remove tracking code without breaking downstream dashboards.

> **External dependency.** The OTel guidance in [`rules/otel-conventions.md`](./rules/otel-conventions.md)
> builds on the `otel-instrumentation` and `otel-semantic-conventions` skills,
> which live in the [dash0 agent-skills repo](https://github.com/dash0hq/agent-skills),
> not this one. That rule **invokes them at runtime via `Skill()` when they're
> installed** (and otherwise skips them with a one-line report, never silently) — install them alongside this skill
> to get their authoritative span/metric/attribute guidance.

> **This `SKILL.md` is a thin index.**
> Detailed rules live in `rules/*.md` and load on demand.
> Worked examples live in `references/*.md`.
> Literal scaffolding lives in `templates/*.md`.

---

## Mode Detection

Parse `$1` as the mode.
State the detected mode in one line before continuing.

| Mode        | Default | Trigger                                                              |
| ----------- | ------- | -------------------------------------------------------------------- |
| `guide`     | **yes** | "what should I track", "is this worth tracking", default if no mode  |
| `implement` |         | "add tracking", "instrument this", "track this event"                |
| `audit`     |         | "audit tracking", "review analytics", "find tracking issues"         |
| `remove`    |         | "remove tracking", "delete this event", "deprecate", "/rm-tracking"  |
| `plan`      |         | "tracking plan", "design event schema", "what events do we need"     |

If `$1` is a target file or directory, treat it as the scope for `audit`,
`implement`, or `remove`.

---

## Workflow by Mode

### Guide mode (default)

The user is deciding *whether* and *what* to track at a specific point.

1. Load [`rules/what-to-track.md`](./rules/what-to-track.md) and
   [`rules/what-not-to-track.md`](./rules/what-not-to-track.md).
2. Cross-check the proposal against
   [`rules/pii-and-compliance.md`](./rules/pii-and-compliance.md).
3. Recommend an event name + property set using
   [`rules/event-design.md`](./rules/event-design.md).
4. If the project uses OpenTelemetry RUM (Dash0 SDK Web, OTel browser /
   mobile, Embrace), also apply
   [`rules/otel-conventions.md`](./rules/otel-conventions.md).
5. Surface canonical events from
   [`references/event-catalog.md`](./references/event-catalog.md) instead
   of inventing new ones when one fits.

### Implement mode

The user wants tracking code written.

1. Confirm the event is in the tracking plan
   ([`rules/tracking-plan.md`](./rules/tracking-plan.md)).
   If not, propose adding it to the plan **first** and gate the user
   before writing instrumentation.
2. Pick the platform:
   - Web (React/Next.js) → [`rules/implementation-web.md`](./rules/implementation-web.md).
   - Mobile (React Native/Expo) → [`rules/implementation-mobile.md`](./rules/implementation-mobile.md).
3. If using OpenTelemetry, also load
   [`rules/otel-conventions.md`](./rules/otel-conventions.md).
4. All tracking calls must go through the centralized wrapper
   ([`templates/analytics-wrapper.template.ts`](./templates/analytics-wrapper.template.ts)).
   Never call the vendor SDK directly from a component.
5. Run the PII gate from
   [`rules/pii-and-compliance.md`](./rules/pii-and-compliance.md) on every
   property before the diff is final.

### Audit mode

The user wants existing tracking reviewed.

1. Walk the checklist in
   [`rules/audit-checklist.md`](./rules/audit-checklist.md).
2. For every finding, cite a file path and line number.
3. Group findings into: blocking (PII / consent / compliance), important
   (drift / ghost events / cardinality), nice-to-have (naming consistency).
4. Output a ranked fix list — do not auto-edit unless the user approved a
   pre-defined audit scope.

### Remove mode

The user wants tracking deprecated or deleted.

1. Apply the lifecycle in
   [`rules/update-and-remove.md`](./rules/update-and-remove.md).
2. Find every callsite via the centralized wrapper's typed event names.
3. Identify downstream consumers (dashboards, funnels, dbt models,
   cohorts) before deletion.
4. Mark `deprecated` first, set a sunset date, then remove.
5. Update the tracking plan and the inventory in the same PR.

### Plan mode

The user wants to design, update, or codegen a tracking plan.

1. Apply the structure in
   [`rules/tracking-plan.md`](./rules/tracking-plan.md).
2. Start from
   [`templates/tracking-plan.template.yaml`](./templates/tracking-plan.template.yaml).
3. Choose a naming school ([`rules/event-design.md`](./rules/event-design.md))
   and freeze it for the project.
4. Wire codegen (Avo, RudderTyper, Typewriter, or hand-rolled
   `json-schema-to-typescript`) so the wrapper is type-checked.

---

## Required Reading by Mode

Load on demand — do not preload.

| Mode        | Files                                                                                                                                                                                                                                                                                                                                                                                                                |
| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `guide`     | [`rules/what-to-track.md`](./rules/what-to-track.md), [`rules/what-not-to-track.md`](./rules/what-not-to-track.md), [`rules/event-design.md`](./rules/event-design.md), [`rules/pii-and-compliance.md`](./rules/pii-and-compliance.md), [`references/event-catalog.md`](./references/event-catalog.md)                                                                                                              |
| `implement` | [`rules/tracking-plan.md`](./rules/tracking-plan.md), [`rules/implementation-web.md`](./rules/implementation-web.md) or [`rules/implementation-mobile.md`](./rules/implementation-mobile.md), [`rules/otel-conventions.md`](./rules/otel-conventions.md) (if OTel), [`rules/pii-and-compliance.md`](./rules/pii-and-compliance.md), [`templates/analytics-wrapper.template.ts`](./templates/analytics-wrapper.template.ts) |
| `audit`     | [`rules/audit-checklist.md`](./rules/audit-checklist.md), [`rules/pii-and-compliance.md`](./rules/pii-and-compliance.md), [`rules/event-design.md`](./rules/event-design.md)                                                                                                                                                                                                                                       |
| `remove`    | [`rules/update-and-remove.md`](./rules/update-and-remove.md), [`rules/tracking-plan.md`](./rules/tracking-plan.md)                                                                                                                                                                                                                                                                                                  |
| `plan`      | [`rules/tracking-plan.md`](./rules/tracking-plan.md), [`rules/event-design.md`](./rules/event-design.md), [`templates/tracking-plan.template.yaml`](./templates/tracking-plan.template.yaml)                                                                                                                                                                                                                       |

[`references/platforms.md`](./references/platforms.md) is optional — load
when the user asks "which platform should we use" or names a specific
vendor.

---

## Core Principles

1. **The tracking plan is the source of truth.**
   Every event must exist in the plan before it exists in code.
2. **Centralized wrapper, never raw SDK calls.**
   One module owns every `track()` callsite; swapping vendors must be a
   single-file change.
3. **Type-safe events.**
   Use codegen (Avo, RudderTyper, Typewriter) or a hand-rolled
   discriminated union so renames break the build.
4. **PII never appears in event properties.**
   Use opaque `user.id`, hash for correlation, strip URLs and free-text.
5. **Low-cardinality event names; rich, bounded properties.**
   ≤ 30 event names in a typical app; high-value context in properties.
6. **Defer sampling to the pipeline.**
   SDKs export everything; the Collector or platform decides what to
   keep.
7. **OpenTelemetry semantic conventions when present.**
   `user.id`, `session.id`, `browser.*`, `app.*`, `error.type` come from
   the registry — do not invent custom names that overlap.
8. **Remove tracking the same way you add it.**
   Plan first, deprecate, find consumers, then delete.

## Anti-patterns (one-liners)

- Scattering `posthog.capture()` / `mixpanel.track()` calls across
  components instead of one wrapper.
- Tracking every hover, scroll, or render — drowns signal, explodes cost.
- Putting email, full URLs with tokens, raw `req.body`, or stack traces
  with user input into event properties.
- Using email or username as `distinct_id` / `user.id` — always opaque.
- Naming events inconsistently (`signup` and `user_registered` for the
  same concept).
- Deleting an event before checking which dashboards consume it.
- Configuring SDK-side sampling — sample in the Collector instead.
- Treating hashed email as anonymous — it remains personal data under
  GDPR.

## Definition of Done

- [ ] Mode detected and stated.
- [ ] Required reading for the mode loaded.
- [ ] If `implement` or `remove`: tracking plan updated in the same diff.
- [ ] PII gate run on every new or modified event.
- [ ] Centralized wrapper used; no raw SDK calls in feature code.
- [ ] Downstream consumers identified before removal.
- [ ] Recommendation cites file paths and line numbers, or proposes a
      concrete diff.
Files in this package (15)
  • SKILL.md 11 KB
  • references/event-catalog.md 14 KB
  • references/platforms.md 9 KB
  • rules/audit-checklist.md 8 KB
  • rules/event-design.md 10 KB
  • rules/implementation-mobile.md 10 KB
  • rules/implementation-web.md 10 KB
  • rules/otel-conventions.md 16 KB
  • rules/pii-and-compliance.md 11 KB
  • rules/tracking-plan.md 9 KB
  • rules/update-and-remove.md 9 KB
  • rules/what-not-to-track.md 10 KB
  • rules/what-to-track.md 10 KB
  • templates/analytics-wrapper.template.ts 8 KB
  • templates/tracking-plan.template.yaml 6 KB

Versions

The database has no other skills named rum-tracking.

Database snapshot: 13.11.2026 · package version 77606bdb6a8b (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100dd-instrument-product-analytics
    Switches on Datadog Product Analytics (funnels, retention, pathways, user journeys) for a browser app that runs the Datadog RUM Browser SDK. Turns the product on for the app's RUM application, ties sessions to signed-in users with setUser, and checks that events arrive. Use when…
  • 100cx-rum-setup
    Use this skill when the user asks to "add RUM", "set up RUM", "install the RUM SDK", "add Coralogix RUM to my app", "create a RUM API key", "RUM public key", "init Coralogix RUM", "CoralogixRum.init", "add the browser SDK", "real user monitoring", "frontend monitoring", "monitor…
  • 100product-analytics-experiments
    Product analytics and experimentation—event design, funnel metrics, tracking plans, and A/B test setup with statistical and operational gates. Use when defining metrics, launch experiments, or reviewing growth/DS product work. Triggers: "A/B test", "experiment", "funnel",…
  • 100api-analytics-posthog-analytics
    PostHog event tracking, user identification, group analytics for B2B, GDPR consent patterns. Use when implementing product analytics, tracking user behavior, setting up funnels, or configuring privacy-compliant tracking.
  • 90mobile-analytics
    Designs and reviews product analytics across Flutter, Android, iOS, React Native and Kotlin Multiplatform. Use for tracking plans, event names and properties, funnels and conversion events, screen tracking, analytics identity across sign-in and sign-out, consent-gated collection…
  • 85dd-browser-sdk
    Datadog Browser SDK — RUM, Logs, Session Replay, profiling, product analytics, and error tracking setup, configuration, and migration. Use when upgrading Browser SDK versions, setting up RUM or Logs, or troubleshooting browser-side Datadog instrumentation.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.