← Back to Skills Marketplace
Cid Tracking
by
zhaohang497-tech
· GitHub ↗
· v1.0.0
· MIT-0
136
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install cid-tracking
Description
支持抖音、快手、腾讯三平台广告CID生成、转化回传、ROI分析、异常监控及专业Excel报表,助力二类电商投流管理。
README (SKILL.md)
CID 投流追踪技能
专为国内二类电商设计的 CID(Click ID)投流追踪技能,支持抖音巨量引擎、快手磁力引擎、腾讯广点通三大广告平台。
核心功能
✅ Click ID 生成
- 为每次广告点击生成唯一标识符
- 支持批量生成和单个生成
- CID 格式符合各平台规范
✅ 转化回传
- 订单数据回传到广告平台
- 支持自定义转化事件
- 回传状态追踪和重试机制
✅ ROI 分析
- 多平台数据聚合分析
- 实时计算投入产出比
- 按计划/创意/时段维度拆解
✅ 数据看板
- 日报/周报自动生成
- 关键指标可视化
- 趋势分析和对比
✅ 异常监控
- 消耗异常预警
- 转化率波动检测
- 低 ROI 计划自动标记
支持平台
| 平台 | API 文档 | 状态 |
|---|---|---|
| 抖音巨量引擎 | https://oceanengine.github.io/open-platform/ | ✅ |
| 快手磁力引擎 | https://mp.weixin.qq.com/ | ✅ |
| 腾讯广点通 | https://e.qq.com/dev/ | ✅ |
快速开始
1. 配置 API 凭证
在 config.json 中配置各平台凭证:
{
"oceanengine": {
"app_id": "你的应用 ID",
"access_token": "访问令牌"
},
"kuaishou": {
"app_id": "你的应用 ID",
"access_token": "访问令牌"
},
"tencent": {
"account_id": "账户 ID",
"secret_key": "密钥"
}
}
2. 生成 CID 追踪链接
python scripts/cid_generator.py --platform oceanengine --campaign_id 12345
3. 获取广告数据
python scripts/data_fetcher.py --platform all --date yesterday
4. 生成 Excel 报表
python scripts/report_generator.py --output daily_report.xlsx --date 2026-03-21
5. 监控异常
python scripts/anomaly_detector.py --threshold 1.5
脚本说明
| 脚本 | 功能 | 输入 | 输出 |
|---|---|---|---|
cid_generator.py |
生成 CID 追踪链接 | 广告计划 ID | 追踪 URL 列表 |
data_fetcher.py |
获取各平台广告数据 | 平台、日期范围 | JSON 数据 |
conversion_tracker.py |
转化数据回传 | 订单数据 | 回传结果 |
roi_analyzer.py |
ROI 分析计算 | 消耗 + 转化数据 | 分析结果 |
report_generator.py |
生成 Excel 报表 | 聚合数据 | .xlsx 文件 |
anomaly_detector.py |
异常检测预警 | 历史数据 | 预警列表 |
Excel 报表结构
生成的报表包含以下工作表:
- 汇总看板 - 核心指标总览
- 分平台数据 - 各平台详细数据
- 计划明细 - 广告计划级别数据
- 异常监控 - 异常计划列表
- 趋势图表 - 消耗/转化趋势图
依赖
pip install openpyxl pandas requests matplotlib
使用示例
示例 1:生成日报
python scripts/report_generator.py \
--output reports/daily_20260321.xlsx \
--date 2026-03-21 \
--platforms oceanengine,kuaishou,tencent
示例 2:回传转化
python scripts/conversion_tracker.py \
--platform oceanengine \
--event purchase \
--cid CID123456 \
--value 299.00
示例 3:检测异常
python scripts/anomaly_detector.py \
--min-roi 1.5 \
--max-cpa 100 \
--notify wechat
注意事项
- API 限流 - 各平台有调用频率限制,建议设置合理的请求间隔
- 数据延迟 - 广告平台数据通常有 2-4 小时延迟
- CID 有效期 - 生成的 CID 链接通常 30 天有效
- 转化归因 - 默认 7 天点击归因窗口
故障排查
| 问题 | 可能原因 | 解决方案 |
|---|---|---|
| API 调用失败 | 凭证过期 | 刷新 access_token |
| 数据为空 | 日期范围无数据 | 检查日期参数 |
| Excel 生成失败 | 依赖缺失 | pip install -r requirements.txt |
| CID 无效 | 格式错误 | 检查平台 CID 规范 |
参考资料
Usage Guidance
This package appears coherent with its stated purpose, but before installing or running it: (1) Review and supply credentials in a private config.json (do not commit secrets into a repo). (2) Use least-privilege API tokens where possible and rotate them if exposed. (3) Test against sandbox/test accounts first — the Tencent signing flow is not implemented in the code and related calls may fail or require manual implementation. (4) Run in an isolated environment (container/VM) if you want to limit blast radius from network activity. (5) If you integrate automatic notifications (e.g., piping alert.txt to a notification tool like send-to-wechat), verify that notification tooling is trusted and does not leak data. (6) If you need stronger secrecy controls, consider adapting the code to read credentials from a secrets manager or environment variables rather than a plaintext config file.
Capability Analysis
Type: OpenClaw Skill
Name: cid-tracking
Version: 1.0.0
The cid-tracking skill bundle is a legitimate marketing tool designed for tracking and analyzing ad performance on major Chinese platforms (Douyin/Ocean Engine, Kuaishou, and Tencent). The scripts, including data_fetcher.py, conversion_tracker.py, and report_generator.py, perform standard API interactions, data normalization, and Excel report generation consistent with the stated purpose. The code follows best practices such as hashing sensitive user data before transmission and using a configuration file for credentials. No indicators of malicious intent, data exfiltration to unauthorized endpoints, or prompt injection attacks were identified.
Capability Assessment
Purpose & Capability
Name/description match the included scripts: CID generation, platform data fetching, conversion backfill, ROI analysis, anomaly detection, and Excel report generation. The skill legitimately needs ad-platform credentials (shown in config.example.json) and network access to the respective platform APIs.
Instruction Scope
SKILL.md and the scripts instruct the agent to read a local config.json and input JSON files and to call the official ad-platform APIs (oceanengine, kuaishou, e.qq.com). The code writes reports and alert files locally. There are no instructions to read unrelated system files, enumerate environment secrets, or post data to unknown/personal endpoints. Note: Tencent sign/authorization is marked TODO in the code and the script prints a warning — calls to Tencent endpoints may fail or behave differently until signing is implemented.
Install Mechanism
No install spec in the registry (instruction-only skill). Dependencies are Python libraries listed in requirements.txt (openpyxl, pandas, requests, etc.), which is proportionate to Excel/reporting and HTTP API usage. No suspicious remote downloads or archive extraction are present.
Credentials
The only secrets shown are platform API credentials in config.example.json (app_id, access_token, secret_id/secret_key, account_id), which are appropriate and necessary for the declared functionality. The registry metadata did not declare env vars, but the SKILL.md and code use a local config.json file for credentials rather than environment variables—this is a design choice, not evidence of unrelated credential access.
Persistence & Privilege
Flags show no elevated persistence (always:false). The skill does not request to modify other skills or global agent settings. It runs as normal scripts and writes outputs to local files as expected.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install cid-tracking - After installation, invoke the skill by name or use
/cid-tracking - Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release of cid-tracking skill — a comprehensive CID tracking toolkit for domestic e-commerce ad platforms.
- Supports ByteDance OceanEngine, Kuaishou Magnetic, and Tencent Guangdiantong ad platforms.
- Provides Click ID generation, conversion postback, ROI analysis, data dashboards, anomaly monitoring, and professional Excel reporting.
- Includes automated daily/weekly reports and multi-platform data aggregation.
- Features tools for conversion tracking, anomaly alerts, and visual trend analysis.
Metadata
Frequently Asked Questions
What is Cid Tracking?
支持抖音、快手、腾讯三平台广告CID生成、转化回传、ROI分析、异常监控及专业Excel报表,助力二类电商投流管理。 It is an AI Agent Skill for Claude Code / OpenClaw, with 136 downloads so far.
How do I install Cid Tracking?
Run "/install cid-tracking" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Cid Tracking free?
Yes, Cid Tracking is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Cid Tracking support?
Cid Tracking is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Cid Tracking?
It is built and maintained by zhaohang497-tech (@zhaohang497-tech); the current version is v1.0.0.
More Skills