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
| Issue | Severity | Solution |
|---|---|---|
| Issue | medium | See docs |
| Issue | high | See docs |
| Issue | medium | See docs |
| Issue | high | See docs |
| Issue | low | See docs |
| Issue | medium | See docs |
| Issue | medium | See docs |
| Issue | high | See docs |
When to Use
This skill is applicable to execute the workflow or actions described in the overview.
AGI Framework Integration
Adapted for @techwavedev/agi-agent-kit Original source: antigravity-awesome-skills
Memory-First Protocol
Retrieve prior API design decisions, database schema choices, and error handling patterns. Cache API response templates for consistent error formatting.
# Check for prior backend/API context before starting
python3 execution/memory_manager.py auto --query "API design patterns and architecture decisions for Segment Cdp"
Storing Results
After completing work, store backend/API decisions for future sessions:
python3 execution/memory_manager.py store \
--content "API architecture: REST with HATEOAS, JWT auth, rate limiting at 100 req/min per tenant" \
--type decision --project <project> \
--tags segment-cdp backend
Multi-Agent Collaboration
Share API contract changes with frontend agents so they update their client code, and with QA agents for test coverage.
python3 execution/cross_agent_context.py store \
--agent "<your-agent>" \
--action "Implemented API endpoints — 5 new routes with OpenAPI spec and integration tests" \
--project <project>
Agent Team: Code Review
After implementation, dispatch code_review_team for two-stage review (spec compliance + code quality) before merging.
Converted and distributed by TomeVault — claim your Tome and manage your conversions.