← 返回 Skills 市场
zhaohang497-tech

Cid Tracking

作者 zhaohang497-tech · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
136
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install cid-tracking
功能描述
支持抖音、快手、腾讯三平台广告CID生成、转化回传、ROI分析、异常监控及专业Excel报表,助力二类电商投流管理。
使用说明 (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 报表结构

生成的报表包含以下工作表:

  1. 汇总看板 - 核心指标总览
  2. 分平台数据 - 各平台详细数据
  3. 计划明细 - 广告计划级别数据
  4. 异常监控 - 异常计划列表
  5. 趋势图表 - 消耗/转化趋势图

依赖

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

注意事项

  1. API 限流 - 各平台有调用频率限制,建议设置合理的请求间隔
  2. 数据延迟 - 广告平台数据通常有 2-4 小时延迟
  3. CID 有效期 - 生成的 CID 链接通常 30 天有效
  4. 转化归因 - 默认 7 天点击归因窗口

故障排查

问题 可能原因 解决方案
API 调用失败 凭证过期 刷新 access_token
数据为空 日期范围无数据 检查日期参数
Excel 生成失败 依赖缺失 pip install -r requirements.txt
CID 无效 格式错误 检查平台 CID 规范

参考资料

安全使用建议
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.
功能分析
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.
能力评估
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.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install cid-tracking
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /cid-tracking 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
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.
元数据
Slug cid-tracking
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Cid Tracking 是什么?

支持抖音、快手、腾讯三平台广告CID生成、转化回传、ROI分析、异常监控及专业Excel报表,助力二类电商投流管理。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 136 次。

如何安装 Cid Tracking?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install cid-tracking」即可一键安装,无需额外配置。

Cid Tracking 是免费的吗?

是的,Cid Tracking 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Cid Tracking 支持哪些平台?

Cid Tracking 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Cid Tracking?

由 zhaohang497-tech(@zhaohang497-tech)开发并维护,当前版本 v1.0.0。

💬 留言讨论