AGENT SKILL

segment

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

License 许可
MIT
最近更新
2026-04-05
Stars
★ 7
Forks
1

01 前言 Front Matter

name
segment
metadata
{ "clawdbot": { "emoji": "?", "requires": { "env": [ "SEGMENT_WRITE_KEY" ] } } }
description
Track events and manage customer data via Segment API. Route data to destinations.

02 资源文件 1

03 SKILL.md 正文

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

04 同仓库更多 Skills