mcpField
S
segment-cdp

segment-cdp

github.com/davila7Data & databases33.0k162 installsUpdated today
Repository

About segment-cdp

A skill for planning Segment CDP event tracking in browser and Node.js applications. It covers tracking patterns, schema design, and common mistakes.

Key features

  1. 01Analytics.js browser tracking
  2. 02Node.js server-side tracking
  3. 03Event schema design
  4. 04Tracking anti-pattern guidance

Use cases

  1. 01Instrument browser interactions
  2. 02Send backend and webhook events
  3. 03Define and validate event schemas

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/davila7/claude-code-templates --skill segment-cdp

After installing, type/segment-cdpin Claude Code to confirm it loaded.

Details

From the project README

Segment CDP

Patterns

Analytics.js Browser Integration

Client-side tracking with Analytics.js. Include track, identify, page, and group calls. Anonymous ID persists until identify merges with user.

Server-Side Tracking with Node.js

High-performance server-side tracking using @segment/analytics-node. Non-blocking with internal batching. Essential for backend events, webhooks, and sensitive data.

Tracking Plan Design

Design event schemas using Object + Action naming convention. Define required properties, types, and validation rules. Connect to Protocols for enforcement.

Anti-Patterns

❌ Dynamic Event Names
❌ Tracking Properties as Events
❌ Missing Identify Before Track

⚠️ Sharp Edges

IssueSeveritySolution
IssuemediumSee docs
IssuehighSee docs
IssuemediumSee docs
IssuehighSee docs
IssuelowSee docs
IssuemediumSee docs
IssuemediumSee docs
IssuehighSee docs

Comments

Markdown supported