专为国内二类电商设计的 CID(Click ID)投流追踪技能,支持抖音巨量引擎、快手磁力引擎、腾讯广点通三大广告平台。
平台API 文档状态抖音巨量引擎https://oceanengine.github.io/open-platform/✅快手磁力引擎https://mp.weixin.qq.com/✅腾讯广点通https://e.qq.com/dev/✅
在 config.json 中配置各平台凭证:
json
{
"oceanengine": {
"app_id": "你的应用 ID",
"access_token": "访问令牌"
},
"kuaishou": {
"app_id": "你的应用 ID",
"access_token": "访问令牌"
},
"tencent": {
"account_id": "账户 ID",
"secret_key": "密钥"
}
}
bash
python scripts/cid_generator.py --platform oceanengine --campaign_id 12345
bash
python scripts/data_fetcher.py --platform all --date yesterday
bash
python scripts/report_generator.py --output daily_report.xlsx --date 2026-03-21
bash
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异常检测预警历史数据预警列表
生成的报表包含以下工作表:
bash
pip install openpyxl pandas requests matplotlib
bash
python scripts/report_generator.py \
--output reports/daily_20260321.xlsx \
--date 2026-03-21 \
--platforms oceanengine,kuaishou,tencent
bash
python scripts/conversion_tracker.py \
--platform oceanengine \
--event purchase \
--cid CID123456 \
--value 299.00
bash
python scripts/anomaly_detector.py \
--min-roi 1.5 \
--max-cpa 100 \
--notify wechat
问题可能原因解决方案API 调用失败凭证过期刷新 access_token数据为空日期范围无数据检查日期参数Excel 生成失败依赖缺失pip install -r requirements.txtCID 无效格式错误检查平台 CID 规范