Segment

Track events and manage customer data via Segment API. Route data to destinations.

modbender Updated 12 repo stars

File contents

Segment

Customer data platform.

Environment

export SEGMENT_WRITE_KEY="xxxxxxxxxx"

Track Event

curl -X POST "https://api.segment.io/v1/track" \
  -u "$SEGMENT_WRITE_KEY:" \
  -H "Content-Type: application/json" \
  -d '{"userId": "user123", "event": "Order Completed", "properties": {"revenue": 99.99}}'

Identify User

curl -X POST "https://api.segment.io/v1/identify" \
  -u "$SEGMENT_WRITE_KEY:" \
  -H "Content-Type: application/json" \
  -d '{"userId": "user123", "traits": {"email": "user@example.com", "plan": "premium"}}'

Page View

curl -X POST "https://api.segment.io/v1/page" \
  -u "$SEGMENT_WRITE_KEY:" \
  -H "Content-Type: application/json" \
  -d '{"userId": "user123", "name": "Home", "properties": {"url": "https://example.com"}}'

Links

modbender/skill-library-mcp/tree/main/data/segment commit 38bee11c95

Frequently asked questions

npx skillmds@latest add modbender/segment