Cid Tracking

v1.0.0

支持抖音、快手、腾讯三平台广告CID生成、转化回传、ROI分析、异常监控及专业Excel报表,助力二类电商投流管理。

0· 133·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for zhaohang497-tech/cid-tracking.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Cid Tracking" (zhaohang497-tech/cid-tracking) from ClawHub.
Skill page: https://clawhub.ai/zhaohang497-tech/cid-tracking
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install cid-tracking

ClawHub CLI

Package manager switcher

npx clawhub@latest install cid-tracking
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
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.
Assessment
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.

Like a lobster shell, security has layers — review code before you run it.

latestvk97bmebgqa4x4zgw3ax9x7nrpd83byk3
133downloads
0stars
1versions
Updated 1mo ago
v1.0.0
MIT-0

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.pyROI 分析计算消耗 + 转化数据分析结果
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 规范

参考资料

Comments

Loading comments...