siluzan-tso-cli 1.1.29-beta.2 → 1.1.29-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.js +3174 -867
- package/dist/skill/AGENTS.md +30 -31
- package/dist/skill/SKILL.md +16 -33
- package/dist/skill/_meta.json +2 -2
- package/dist/skill/assets/campaign-create-keyword-test.fixed.json +10 -33
- package/dist/skill/assets/campaign-create-template.json +2 -0
- package/dist/skill/assets/campaign-create-template.md +114 -99
- package/dist/skill/assets/market-analysis-rules.md +55 -55
- package/dist/skill/assets/meta-period-report-rules.md +61 -60
- package/dist/skill/assets/pmax-asset-group-template.json +12 -4
- package/dist/skill/assets/pmax-asset-group-template.md +25 -0
- package/dist/skill/assets/pmax-brand-assets-template.json +25 -0
- package/dist/skill/assets/pmax-brand-assets-template.md +22 -0
- package/dist/skill/assets/pmax-brand-guidelines-enable-template.json +24 -0
- package/dist/skill/assets/pmax-brand-guidelines-enable-template.md +22 -0
- package/dist/skill/assets/pmax-create-template.json +41 -2
- package/dist/skill/assets/pmax-create-template.md +84 -51
- package/dist/skill/assets/pmax-lead-form-template.json +36 -0
- package/dist/skill/assets/pmax-lead-form-template.md +70 -0
- package/dist/skill/assets/pmax-signals-template.json +2 -6
- package/dist/skill/assets/pmax-whatsapp-template.json +26 -0
- package/dist/skill/assets/pmax-whatsapp-template.md +45 -0
- package/dist/skill/assets/website-diagnosis-rules.md +67 -67
- package/dist/skill/references/README.md +78 -65
- package/dist/skill/references/accounts/accounts.md +99 -105
- package/dist/skill/references/accounts/finance.md +23 -79
- package/dist/skill/references/accounts/open-account-by-media.md +84 -81
- package/dist/skill/references/accounts/open-account-google-ui.md +24 -24
- package/dist/skill/references/analytics/account-analytics.md +94 -103
- package/dist/skill/references/analytics/facebook-analysis-guide.md +61 -61
- package/dist/skill/references/analytics/google-analysis-batch.md +2 -2
- package/dist/skill/references/analytics/keyword-planner-workflows.md +22 -23
- package/dist/skill/references/analytics/market-analysis-guide.md +31 -25
- package/dist/skill/references/analytics/rag.md +20 -20
- package/dist/skill/references/analytics/reporting.md +4 -4
- package/dist/skill/references/analytics/website-diagnosis-guide.md +24 -24
- package/dist/skill/references/core/agent-conventions.md +136 -106
- package/dist/skill/references/core/cli-enums.md +47 -53
- package/dist/skill/references/core/playbooks.md +42 -41
- package/dist/skill/references/core/subagent-orchestration.md +40 -40
- package/dist/skill/references/core/tips.md +18 -61
- package/dist/skill/references/core/workflows.md +36 -29
- package/dist/skill/references/google-ads/google-ads-campaign-plan.md +25 -24
- package/dist/skill/references/google-ads/google-ads.md +81 -57
- package/dist/skill/references/google-ads/pmax-api.md +138 -34
- package/dist/skill/references/google-ads/rules/README.md +15 -15
- package/dist/skill/references/google-ads/rules/google-ads-account-audit.md +22 -22
- package/dist/skill/references/google-ads/rules/google-ads-compliance.md +27 -27
- package/dist/skill/references/google-ads/rules/google-ads-keyword-strategy.md +15 -15
- package/dist/skill/references/google-ads/rules/google-ads-keyword-taxonomy.md +32 -22
- package/dist/skill/references/google-ads/rules/google-ads-launch-plan-template.md +32 -30
- package/dist/skill/references/google-ads/rules/google-ads-pmax-guide.md +3 -1
- package/dist/skill/references/misc/tso-home.md +8 -8
- package/dist/skill/references/operations/clue.md +1 -1
- package/dist/skill/references/operations/forewarning.md +1 -1
- package/dist/skill/references/operations/hosted-automation-optimize-index.md +2 -2
- package/dist/skill/references/operations/hosted-automation-scenarios.md +5 -5
- package/dist/skill/references/operations/hosted-automation-self-control.md +15 -15
- package/dist/skill/references/operations/hosted-automation-user-catalog.md +13 -13
- package/dist/skill/references/operations/optimize.md +8 -8
- package/dist/skill/references/report-templates/README.md +45 -0
- package/dist/skill/references/report-templates/REPORT-WORKFLOW.md +114 -0
- package/dist/skill/references/report-templates/bing-period-report.md +65 -0
- package/dist/skill/references/report-templates/google-account-diagnosis-report.md +83 -0
- package/dist/skill/references/report-templates/google-ads-diagnosis.md +378 -0
- package/dist/skill/references/report-templates/google-inquiry-analysis.md +543 -0
- package/dist/skill/references/report-templates/google-period-report-excel.md +126 -0
- package/dist/skill/references/report-templates/google-period-report.md +60 -0
- package/dist/skill/references/report-templates/market-analysis-report.md +40 -0
- package/dist/skill/references/report-templates/meta-account-diagnosis-report.md +74 -0
- package/dist/skill/references/report-templates/meta-period-report-excel.md +230 -0
- package/dist/skill/references/report-templates/meta-period-report.md +219 -0
- package/dist/skill/references/report-templates/okki-weekly-google-client.md +217 -0
- package/dist/skill/references/report-templates/tiktok-period-report.md +56 -0
- package/dist/skill/references/report-templates/website-diagnosis-report.md +79 -0
- package/dist/skill/report-templates/README.md +16 -14
- package/dist/skill/report-templates/REPORT-WORKFLOW.md +13 -13
- package/dist/skill/report-templates/google-account-diagnosis-report.md +1 -1
- package/dist/skill/report-templates/google-ads-diagnosis.md +21 -21
- package/dist/skill/report-templates/google-inquiry-analysis.md +44 -44
- package/dist/skill/report-templates/google-period-report-excel.md +24 -24
- package/dist/skill/report-templates/google-period-report.md +23 -23
- package/dist/skill/report-templates/market-analysis-report.md +1 -1
- package/dist/skill/report-templates/meta-period-report-excel.md +72 -64
- package/dist/skill/report-templates/meta-period-report.html +706 -428
- package/dist/skill/report-templates/meta-period-report.md +61 -60
- package/dist/skill/report-templates/okki-weekly-google-client.md +26 -26
- package/dist/skill/report-templates/report-template-academic.html +1 -1
- package/dist/skill/report-templates/report-template-dark.html +1 -1
- package/dist/skill/report-templates/report-template-formal.html +1 -1
- package/dist/skill/report-templates/report-template-mobile.html +1 -1
- package/dist/skill/report-templates/report-template-onepager.html +1 -1
- package/dist/skill/report-templates/report-template-print.html +1 -1
- package/dist/skill/report-templates/report-template.html +1 -1
- package/dist/skill/report-templates/website-diagnosis-report.html +1731 -1653
- package/dist/skill/report-templates/website-diagnosis-report.md +21 -23
- package/dist/skill/scripts/install.ps1 +1 -1
- package/dist/skill/scripts/install.sh +1 -1
- package/dist/skill/snippets/handoff-p7-inquiry.md +5 -5
- package/eval/cases/accounts-entityid-vs-mediaccustomerid.scenario.json +2 -14
- package/eval/cases/accounts-mcc-bind-inquiry.scenario.json +1 -3
- package/eval/cases/accounts-single-balance-not-bulk.scenario.json +3 -14
- package/eval/cases/budget-display-not-raw-micros.scenario.json +1 -8
- package/eval/cases/clue-meta-leads-json.scenario.json +2 -14
- package/eval/cases/clue-tiktok-leads-json.scenario.json +2 -11
- package/eval/cases/destructive-account-delink-needs-confirm.scenario.json +3 -9
- package/eval/cases/destructive-forewarning-delete-needs-confirm.scenario.json +3 -9
- package/eval/cases/destructive-invoice-apply-needs-confirm.scenario.json +3 -9
- package/eval/cases/facebook-analysis-google-section-aliases.scenario.json +2 -11
- package/eval/cases/facebook-analysis-not-google-keywords.scenario.json +3 -10
- package/eval/cases/facebook-analysis-period-default.scenario.json +2 -14
- package/eval/cases/finance-invoice-info-list.scenario.json +3 -11
- package/eval/cases/forewarning-list-google.scenario.json +3 -14
- package/eval/cases/google-ads-no-structural-without-confirm.scenario.json +2 -6
- package/eval/cases/google-analysis-keywords-route.scenario.json +2 -14
- package/eval/cases/human-p1-multiturn.scenario.json +1 -5
- package/eval/cases/meta-single-balance-not-bulk.scenario.json +3 -17
- package/eval/cases/no-legacy-json-flag.scenario.json +2 -6
- package/eval/cases/open-account-google-noninteractive.scenario.json +1 -3
- package/eval/cases/open-account-tiktok-license-file.scenario.json +1 -3
- package/eval/cases/optimize-list-by-account.scenario.json +3 -11
- package/eval/cases/p1-single-account-profile.scenario.json +1 -11
- package/eval/cases/p2-balance-scan-bulk.scenario.json +2 -9
- package/eval/cases/p3-accounts-digest.scenario.json +1 -5
- package/eval/cases/p4-fb-meta-period-report.scenario.json +2 -12
- package/eval/cases/p4-period-report-window.scenario.json +1 -8
- package/eval/cases/pmax-asset-group-create-with-bg.scenario.json +15 -0
- package/eval/cases/pmax-brand-edit-routing.scenario.json +12 -0
- package/eval/cases/pmax-edit-not-campaign-edit.scenario.json +15 -0
- package/eval/cases/pmax-enable-brand-guidelines.scenario.json +15 -0
- package/eval/cases/pmax-no-assets-update-brand-fields.scenario.json +12 -0
- package/eval/cases/rag-before-keyword-expand.scenario.json +1 -11
- package/eval/cases/rag-list-then-query.scenario.json +2 -14
- package/eval/cases/report-list-google.scenario.json +2 -11
- package/eval/cases/report-push-list-google.scenario.json +2 -11
- package/eval/cases/setup-login-or-env.scenario.json +1 -3
- package/eval/cases/setup-siluzan-data-permission-env.scenario.json +1 -3
- package/eval/cases/tiktok-bc-bind-inquiry.scenario.json +2 -6
- package/eval/cases/time-range-user-delegates-default.scenario.json +1 -8
- package/eval/cases/tips-json-out-filtering.scenario.json +1 -3
- package/eval/cases/tips-large-json-pagination.scenario.json +1 -3
- package/eval/cases/uj-ad-campaign-validate-before-create-stub.scenario.json +2 -11
- package/eval/cases/uj-ad-outdoor-campgear-search-plan.scenario.json +1 -3
- package/eval/cases/uj-analytics-30d-pdf-campaign-device-geo.scenario.json +6 -18
- package/eval/cases/uj-analytics-compare-google-tiktok-last-month-roi.scenario.json +1 -8
- package/eval/cases/uj-analytics-google-weekly-trends-campaigns-keywords.scenario.json +2 -11
- package/eval/cases/uj-analytics-report-push-weekly-email.scenario.json +1 -3
- package/eval/cases/uj-finance-invoice-records-this-month.scenario.json +2 -11
- package/eval/cases/uj-life-newbie-siluzan-google-end-to-end.scenario.json +1 -4
- package/eval/cases/uj-ops-google-accounts-list-normal.scenario.json +2 -17
- package/eval/cases/uj-ops-google-yesterday-spend-conversions.scenario.json +2 -14
- package/eval/cases/uj-ops-pause-worst-adgroup-confirm.scenario.json +2 -6
- package/eval/cases/uj-ops-tiktok-leads-last-week.scenario.json +3 -17
- package/eval/cases/uj-patrol-cpc-spike-adgroups-over-15.scenario.json +1 -5
- package/eval/cases/uj-patrol-forewarning-create-daily-cap-3000.scenario.json +1 -3
- package/eval/cases/uj-patrol-forewarning-trigger-records.scenario.json +3 -17
- package/eval/cases/uj-patrol-google-balances-low.scenario.json +2 -11
- package/eval/cases/uj-roi-optimize-records-then-execute-cautiously.scenario.json +3 -14
- package/eval/cases/uj-roi-search-terms-add-negative-keywords.scenario.json +2 -14
- package/eval/stub-fixtures/facebook-analysis.json +24 -4
- package/eval/stub-fixtures/meta-overview.json +4 -1
- package/eval/stub-fixtures/pmax-asset-group-create-ok.json +12 -0
- package/eval/stub-fixtures/pmax-brand-assets-edit-ok.json +11 -0
- package/eval/stub-fixtures/pmax-brand-guidelines-enable-ok.json +11 -0
- package/eval/stub-fixtures/pmax-edit-ok.json +11 -0
- package/eval/stub-fixtures/pmax-get-bg-on.json +20 -0
- package/package.json +1 -1
- package/dist/skill/references/core/deliverable-preflight.md +0 -109
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
# Meta(Facebook)账户 — 周期分析报告
|
|
2
|
+
|
|
3
|
+
> 统计区间:`{startDate}` ~ `{endDate}`
|
|
4
|
+
> 账户:`{mediaCustomerId}`(`{mediaCustomerName}`)
|
|
5
|
+
|
|
6
|
+
> **默认交付物**:一份可打开的、带 ECharts 图表的 **HTML 文件**(如 `meta-period-report.html`)。
|
|
7
|
+
> 用户**未指定格式**时一律走下方 **标准四步流程**;**禁止**仅 Markdown 摘要或纯 JSON 充当终稿。
|
|
8
|
+
> 用户**明确要求 Excel / xlsx** 时,改走 `report-templates/meta-period-report-excel.md` 分支(见文末「Excel 分支」)。
|
|
9
|
+
|
|
10
|
+
字段口径见 `references/analytics/facebook-analysis-guide.md`。
|
|
11
|
+
**内容丰富度(必读)**:`assets/meta-period-report-rules.md`(对齐 P8 网站诊断:全量建议 + 字数下限 + 7 维清单)。
|
|
12
|
+
Agent JSON Schema:`assets/meta-period-report.schema.json`。
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## 标准四步流程(默认 · 交付 HTML)
|
|
17
|
+
|
|
18
|
+
| 步骤 | 执行者 | 动作 |
|
|
19
|
+
| ---------------- | ------------ | ------------------------------------------------------------------------------------------------------- |
|
|
20
|
+
| **1. 拉数** | Agent 调 CLI | `facebook-analysis -a <id> --start <s> --end <e> --json-out ./snap-fb` |
|
|
21
|
+
| **2. 分析** | Agent | 用 **node/python 脚本**读落盘 JSON(勿用 Read 打开业务 `*.json`),完成筛选、聚合、排序与洞察 |
|
|
22
|
+
| **3. 写 JSON** | Agent | 按本纲要撰写 `meta-period-report.json`(`meta` / `narrative` / 可选 HTML 扩展字段) |
|
|
23
|
+
| **4. 渲染 HTML** | CLI | `facebook-analysis render` — **校验 JSON 必含字段**,缺项报错不生成 HTML;**禁止** Agent 手写/拼接 HTML |
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
# 步骤 1
|
|
27
|
+
siluzan-tso facebook-analysis -a <id> --start <s> --end <e> --json-out ./snap-fb \
|
|
28
|
+
--sections overview,ad-sets,platform,country,audience
|
|
29
|
+
|
|
30
|
+
# 步骤 4(步骤 2~3 完成后)
|
|
31
|
+
siluzan-tso facebook-analysis render \
|
|
32
|
+
--data ./meta-period-report.json \
|
|
33
|
+
--snapshot-dir ./snap-fb \
|
|
34
|
+
--out ./meta-period-report.html
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
`--snapshot-dir` 与步骤 1 的 `--json-out` 同目录;CLI 自动合并 KPI、平台/国家/受众图表与表格(Agent JSON 已有字段不覆盖)。
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Excel 分支(仅当用户指定 Excel / xlsx)
|
|
42
|
+
|
|
43
|
+
用户说「要 Excel」「导出 xlsx」「按业务 Excel 模板」等时:
|
|
44
|
+
|
|
45
|
+
1. 步骤 1~3 **与 HTML 流程相同**(拉数 → 分析 → 写 `meta-period-report.json`)。
|
|
46
|
+
2. **步骤 4 改为**:Agent 执行 **node/python 脚本**(如 `openpyxl` / `exceljs`)读取快照 JSON + `meta-period-report.json`,按 `meta-period-report-excel.md` 写出 `.xlsx`。
|
|
47
|
+
3. **不要**调用 `facebook-analysis render`(除非用户同时要 HTML + Excel)。
|
|
48
|
+
4. **禁止**假设存在 `siluzan-tso … excel` 子命令。
|
|
49
|
+
|
|
50
|
+
版式与 5 Sheet 结构见 **`report-templates/meta-period-report-excel.md`**。
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## 与原业务(TSO / Skill)对齐
|
|
55
|
+
|
|
56
|
+
| 环节 | 实现 |
|
|
57
|
+
| ----------------- | ------------------------------------- |
|
|
58
|
+
| CLI 拉数 | 步骤 1 |
|
|
59
|
+
| Agent 分析 + 撰写 | 步骤 2~3 → `meta-period-report.json` |
|
|
60
|
+
| **HTML 终稿** | 步骤 4 → `facebook-analysis render` |
|
|
61
|
+
| **Excel 终稿** | 仅用户指定时 → Agent 脚本写 xlsx |
|
|
62
|
+
|
|
63
|
+
模板源码:
|
|
64
|
+
|
|
65
|
+
- `report-templates/meta-period-report.html` — 结构与样式(对齐深度分析月报)
|
|
66
|
+
- `report-templates/meta-period-report.runtime.js` — 可选外链运行时(逻辑已内联于 HTML;ECharts 渲染 + 章节 DOM 拼装)
|
|
67
|
+
|
|
68
|
+
`render` 会向输出目录写入 HTML + `meta-period-report.runtime.js`,并注入 `window.__META_PERIOD_REPORT__`。
|
|
69
|
+
传 `--snapshot-dir` 时 CLI 自动从快照合并 KPI、平台/国家/受众图表数据、广告组与受众表格(Agent JSON 中已有字段不覆盖)。
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## Excel 五 Sheet 与 CLI 维度(默认周期报告)
|
|
74
|
+
|
|
75
|
+
| # | Excel Sheet | 报告章节 | CLI `--sections` | 后端 Section |
|
|
76
|
+
| --- | -------------- | ------------------------------------------ | ------------------------------ | ------------------- |
|
|
77
|
+
| 1 | **总数据** | 账户 KPI + 叙事(整体/区域/国家/优化建议) | `overview` | OverviewSectionData |
|
|
78
|
+
| 2 | **广告组数据** | 区域组对比表(leads-欧洲/拉美/亚洲) | `ad-sets`(别名 `campaigns`) | AdSetSectionData |
|
|
79
|
+
| 3 | **平台数据** | Facebook vs Instagram | `platform`(别名 `devices`) | PlatformSectionData |
|
|
80
|
+
| 4 | **国家数据** | 国家/地区排行 | `country`(别名 `geographic`) | CountrySectionData |
|
|
81
|
+
| 5 | **受众数据** | 年龄 × 性别矩阵 | `audience` | AudienceSectionData |
|
|
82
|
+
|
|
83
|
+
**Excel 默认不含、按需追加:**
|
|
84
|
+
|
|
85
|
+
| 章节 | CLI | 何时追加 |
|
|
86
|
+
| ---------- | ------------------------------ | ---------------------- |
|
|
87
|
+
| 广告创意 | `creative`(别名 `ads`) | 用户要创意表或 DC 素材 |
|
|
88
|
+
| 原生素材 | `material`(别名 `materials`) | Dynamic Creative 账户 |
|
|
89
|
+
| _按日趋势_ | — | 接口无 |
|
|
90
|
+
| _关键词_ | — | 不适用 |
|
|
91
|
+
|
|
92
|
+
与 Google 8 章对照见 `facebook-analysis-guide.md`。
|
|
93
|
+
|
|
94
|
+
**可选追加(执行拉数前可询问用户):**
|
|
95
|
+
|
|
96
|
+
| 维度 | CLI | 何时追加 |
|
|
97
|
+
| ----------- | ------------------------------ | ---------------------------------------- |
|
|
98
|
+
| DC 原生素材 | `material`(别名 `materials`) | 用户要素材 Tab 或账户为 Dynamic Creative |
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## 拉数(默认 5 个数据维 = Excel 五 Sheet,一次批拉)
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
mkdir -p ./snap-fb
|
|
106
|
+
siluzan-tso facebook-analysis -a <mediaCustomerId> --start <s> --end <e> --json-out ./snap-fb \
|
|
107
|
+
--sections overview,ad-sets,platform,country,audience
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
- 含创意:加 `creative`;全 7 数据维(含 `material`):省略 `--sections`。
|
|
111
|
+
- 国家 Top 10:同上命令加 `--limit 10`。
|
|
112
|
+
- 账户 ID:数字或 `act_<数字>`;读 `report-manifest-<id>.json` 与各 `<section>-<id>.json`。
|
|
113
|
+
- **勿**用 `report meta-overview` 代替本流程(仅 legacy 单维总览)。
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## 各章撰写要求(对齐 Excel 总数据 Sheet)
|
|
118
|
+
|
|
119
|
+
### 1. 整体表现(`narrative.overall`)
|
|
120
|
+
|
|
121
|
+
- 数据源:`overview-<id>.json` → `currentPeriod`(可选对比 `previousPeriod` 写环比)。
|
|
122
|
+
- **1 段话**必含:花费、**结果**(`results`)、CPL(`costPerResult`)、覆盖、展示、频次。
|
|
123
|
+
- 元信息注明:`resultType`、`attributionSetting`(写入 `meta`)。
|
|
124
|
+
- **勿写** overview 顶层 `totalCost`/`balance`/`optimizationScore`。
|
|
125
|
+
|
|
126
|
+
### 2. 区域报告(`narrative.regional[]`)
|
|
127
|
+
|
|
128
|
+
- 数据源:`ad-sets-<id>.json` → `adGroups[]`。
|
|
129
|
+
- **每个广告组 1 段**(如 leads-欧洲 / leads-拉美 / leads-亚洲):CPL、线索数、覆盖、频次、效率判断。
|
|
130
|
+
- 表格列对齐 Excel:系列名、组名、覆盖、展示、频次、归因、成效类型、成效、花费、单次成效费用。
|
|
131
|
+
|
|
132
|
+
### 3. 国家报告(`narrative.country`)
|
|
133
|
+
|
|
134
|
+
- 数据源:`country-<id>.json` → `countries[]`。
|
|
135
|
+
- **1 段话**:最低/最高 CPL 国家、中间梯队;表格按花费或 CPL 排序展示。
|
|
136
|
+
|
|
137
|
+
### 4. 优化建议(`narrative.recommendations[]` + `supplementaryRecommendations` + `priorityPlan`)
|
|
138
|
+
|
|
139
|
+
**固定 4 条标题**(`narrative.recommendations[]`,每条 content **≥150 字**,须引用当次 CPL/国家/组名):
|
|
140
|
+
|
|
141
|
+
| 标题 | 内容要点 |
|
|
142
|
+
| ------------ | -------------------------------------------------- |
|
|
143
|
+
| 简化表单问题 | 结合高频次高 CPL 市场;字段缩减至 3 项;写预期影响 |
|
|
144
|
+
| 区域调整 | 各广告组语言/市场策略(土/葡/德等);加减仓名单 |
|
|
145
|
+
| 预算重构 | 具体比例(如 4:3:3)、测试周期、CPL 阈值优胜劣汰 |
|
|
146
|
+
| 素材建议 | 分平台/分市场;素材套数、IG 短视频、FB 形态 |
|
|
147
|
+
|
|
148
|
+
**另须** `supplementaryRecommendations` **7 维**(预算、平台、地域、受众、创意、频次、接口限制)与 `priorityPlan`(高/中/低各 ≥2 条)。细则见 **`assets/meta-period-report-rules.md`**。
|
|
149
|
+
|
|
150
|
+
### 5. 平台数据(Sheet3 表 + 可选 `sections.platform.insight`)
|
|
151
|
+
|
|
152
|
+
- 数据源:`platform-<id>.json` → 按 `publisherPlatform` 汇总(Excel 仅平台列)。
|
|
153
|
+
- 版位细拆(`platformPosition`)为 HTML 扩展,Excel 不要求。
|
|
154
|
+
|
|
155
|
+
### 6. 受众数据(Sheet5 表)
|
|
156
|
+
|
|
157
|
+
- 数据源:`audiences[]`;`age`、`gender`。
|
|
158
|
+
- 含 `unknown` 性别或零成效行时标注「样本不足」。
|
|
159
|
+
|
|
160
|
+
### 可选:广告创意 / 原生素材
|
|
161
|
+
|
|
162
|
+
- 仅当用户追加拉取 `creative` / `material`。
|
|
163
|
+
- **勿**加总各行 `results` 与 overview 对比。
|
|
164
|
+
|
|
165
|
+
### HTML 深度分析扩展(**默认交付必填**,Excel 不含)
|
|
166
|
+
|
|
167
|
+
用户未指定 Excel 时,除 `narrative` 外 **必须** 填写(字数见 `meta-period-report-rules.md` §四):
|
|
168
|
+
|
|
169
|
+
- `executiveSummary[]`:**3~5 段**「为什么」解读(每段 ≥80 字)
|
|
170
|
+
- `healthDiagnosis`:三阶段 + **4 张四问卡片** + **≥6 行**红绿灯表(③ 该加还是该减;可省略 `scorecard`,render 时由 `--snapshot-dir` 自动补全)
|
|
171
|
+
- `sections.platform/country/adSets.insight`:各 **≥200 字**
|
|
172
|
+
- `sections.audience`:`goldenProfile` ≥3 条 + `antiProfile` ≥2 条
|
|
173
|
+
- `sections.landingPage.rows`:≥3 行
|
|
174
|
+
- `abTests`:≥3 个实验;`actionChecklist`:today/thisWeek/thisMonth 非空
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## 口径速记
|
|
179
|
+
|
|
180
|
+
| 展示 | 字段 |
|
|
181
|
+
| -------------- | ----------------------------------- |
|
|
182
|
+
| Meta「结果」 | `results` |
|
|
183
|
+
| 单次成效费用 | `costPerResult` |
|
|
184
|
+
| 业务转化 / CPA | `conversions` / `costPerConversion` |
|
|
185
|
+
| CTR | `ctr` × 100 → % |
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
## Agent JSON 结构(`meta-period-report.json`)
|
|
190
|
+
|
|
191
|
+
完整 Schema:`assets/meta-period-report.schema.json`。Excel 必含字段:
|
|
192
|
+
|
|
193
|
+
| 字段 | 必填 | 说明 |
|
|
194
|
+
| ---------------------------------- | -------------- | --------------------------------------------------------------- |
|
|
195
|
+
| `meta` | 推荐 | 账户名、周期、`resultType`、`attributionSetting`、`generatedAt` |
|
|
196
|
+
| `kpis` | 可省略 | 账户 KPI 行;由 `--snapshot-dir` 从 `overview` 合并 |
|
|
197
|
+
| **`narrative.overall`** | **Excel 必含** | 整体表现 1 段 |
|
|
198
|
+
| **`narrative.regional[]`** | **Excel 必含** | `{ adGroupName, text }` 区域报告 |
|
|
199
|
+
| **`narrative.country`** | **Excel 必含** | 国家对比 1 段 |
|
|
200
|
+
| **`narrative.recommendations[]`** | **必含** | 固定 4 条,每条 ≥150 字 |
|
|
201
|
+
| **`supplementaryRecommendations`** | **必含** | 7 维数据驱动建议 |
|
|
202
|
+
| **`priorityPlan`** | **推荐** | 高/中/低各 ≥2 条;HTML 强烈建议填写 |
|
|
203
|
+
| `tables` / `charts` | 可省略 | Sheet2~5;由快照自动汇总 |
|
|
204
|
+
| `executiveSummary` | **HTML 必填** | 3~5 段深度摘要 |
|
|
205
|
+
| `healthDiagnosis` | **HTML 必填** | 四问 + 红绿灯表(`scorecard` 可由 CLI 从快照自动补全) |
|
|
206
|
+
| `sections.*.insight` | **HTML 必填** | 各维度 ≥200 字 |
|
|
207
|
+
| `abTests` / `actionChecklist` | **HTML 必填** | ≥3 实验 + 三列行动清单 |
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
## 相关文档
|
|
212
|
+
|
|
213
|
+
| 文档 | 用途 |
|
|
214
|
+
| --------------------------------------------------- | --------------------------------------------------- |
|
|
215
|
+
| **`report-templates/meta-period-report-excel.md`** | **Excel 五 Sheet 规格(业务模板基准)** |
|
|
216
|
+
| `assets/meta-period-report.schema.json` | Agent JSON Schema |
|
|
217
|
+
| `references/analytics/facebook-analysis-guide.md` | 字段、Google 对照、建议清单 |
|
|
218
|
+
| `report-templates/meta-account-diagnosis-report.md` | 深度诊断(在可用 Section 内尽量对齐 Google 诊断章) |
|
|
219
|
+
| `report-templates/REPORT-WORKFLOW.md` | 通用六步流程 |
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
# OKKI 周报 · Google 客户同步(运营模板)
|
|
2
|
+
|
|
3
|
+
> **触发话术(等价即可)**
|
|
4
|
+
> `使用okki周报模板生成<账户名或ID>,<YYYY-MM-DD>--<YYYY-MM-DD>的投放报告`
|
|
5
|
+
> 同义:`OKKI 周报`、`okki 周报模板`、`运营 OKKI 周报`。
|
|
6
|
+
> **媒体**:当前模板仅规范 **Google**(`mediaCustomerId`)。其他媒体用各自 `*-period-report.md`。
|
|
7
|
+
> **Excel 版式基准**:与运营样表《**数据复盘分析**》类 xlsx 对齐(如 `2025.12数据复盘分析.xlsx`);工作簿 5 个 Sheet、顺序与表头以下文规范为准。
|
|
8
|
+
|
|
9
|
+
识别到上述意图时:**不要**再走 `google-period-report.md` 的「默认 8 维 + 追问追加」流程;按本文**固定维度 + 固定客户话术**交付(数据全部来自 CLI 落盘 JSON,见 `references/analytics/account-analytics.md`)。
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 须先确认
|
|
14
|
+
|
|
15
|
+
1. **账户**:`mediaCustomerId` 来自 `list-accounts -m Google -k <id>`,禁止猜 ID。
|
|
16
|
+
2. **统计区间**:`--start` / `--end`(用户未给齐时按 SKILL 反问;授权默认时可用「上一完整自然周」白名单并写明)。
|
|
17
|
+
3. **询盘口径**:默认使用区间内 `conversions`(转化次数,来自 `stats` 或 `overview`)。若运营定义为某类转化,须在首段脚注说明(必要时补拉 `google-analysis --sections conversion-actions` 仅作说明)。
|
|
18
|
+
4. **日期写法**:`2026.4.1`、`2026/4/1` 等先规范为 `YYYY-MM-DD`(如 `2026-04-01`)再传 `--start` / `--end`。
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 架构约定 · Excel 由谁生成
|
|
23
|
+
|
|
24
|
+
- **`siluzan-tso` 不提供**「一键生成 OKKI Excel」的子命令,**也不要**在 CLI 里新增。
|
|
25
|
+
- 需交付 Excel 时:由 **Agent(含 WorkBuddy 编排)** 在下列 CLI **`--json-out` 落盘后**,自行编写 **Node.js / Python** 脚本(如 `exceljs`、`xlsx`、`openpyxl`)读取 JSON → 写 `.xlsx`。
|
|
26
|
+
- **数值一律来自落盘 JSON,禁止在脚本里写死业务数字。**
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## 拉数(一次目录)
|
|
31
|
+
|
|
32
|
+
同一目录落盘(示例 `./snap-okki`):
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
mkdir -p ./snap-okki
|
|
36
|
+
|
|
37
|
+
siluzan-tso list-accounts -m Google -k <mediaCustomerId> --json-out ./snap-okki
|
|
38
|
+
|
|
39
|
+
siluzan-tso stats -m Google -a <mediaCustomerId> --start <S> --end <E> --json-out ./snap-okki
|
|
40
|
+
|
|
41
|
+
siluzan-tso balance -m Google -a <mediaCustomerId> --json-out ./snap-okki
|
|
42
|
+
|
|
43
|
+
siluzan-tso google-analysis -a <mediaCustomerId> --start <S> --end <E> --json-out ./snap-okki \
|
|
44
|
+
--sections overview,campaigns,keywords,search-terms,campaign-device,campaign-geo-matched
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
**说明**:
|
|
48
|
+
|
|
49
|
+
- `stats`:区间消耗 / 曝光 / 点击 / 转化 / CTR / CPC,与账户级周报摘要对齐;金额用 `*Display` 或文档规定的展示字段。
|
|
50
|
+
- `balance`:**当前**余额(非历史快照),话术写「截至查询时点」。
|
|
51
|
+
- 「设备」「国家」两 Sheet **必须**用 **`campaign-device` / `campaign-geo-matched`**(按系列/组拆行),**不要**用账户级 `devices` / `geographic`,也**不要**用 `campaign-geo`(定向地理位置,与 OKKI「地理位置报告」口径不一致)。落盘文件名为 `campaign-device-<id>.json`、`campaign-geo-matched-<id>.json`。跨系列汇总在脚本中做。
|
|
52
|
+
- 可选:`campaign-geo-matched` 支持 `--cost-greater` / `--click-greater` / `--conversions-greater`(见 `references/analytics/account-analytics.md`)。
|
|
53
|
+
- TopN、排序、汇总均在脚本内对 JSON 完成,禁止心算。
|
|
54
|
+
- 写脚本前先读各 `<section>-<id>.outline.txt` 再读 `.json`。
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## xlsx 版式规范
|
|
59
|
+
|
|
60
|
+
工作簿 → Sheet 名(须完全一致)→ 版式。**不**单独建「广告系列」Sheet(系列表在 `账户报告` 内)。状态枚举若为英文须转中文。
|
|
61
|
+
|
|
62
|
+
### 数值格式(强约束)
|
|
63
|
+
|
|
64
|
+
- **所有数值列一律保留 2 位小数**:金额、CPC、每次转化费用、预算、点击率、转化率、互动率等。
|
|
65
|
+
- 客户话术 / 文案中的 `x%`:`(v * 100).toFixed(2) + "%"`。
|
|
66
|
+
|
|
67
|
+
### 点击率 / 转化率 / 互动率
|
|
68
|
+
|
|
69
|
+
> **2026-05 起 CLI 已统一归一**(manifest `schemaVersion ≥ 2`):所有 `<section>-*.json` 中的 `ctr` / `conversionRate` 一律为 **0~1 小数**(如 `0.10` = 10.00%)。`schemaVersion 3` 起行数据统一在 `items[]`、汇总在 `record`。详见 `references/analytics/account-analytics.md`「指标字段对照」「落盘 JSON 统一信封」。
|
|
70
|
+
|
|
71
|
+
| 场景 | 处理 |
|
|
72
|
+
| ------------------------------------------------- | -------------------------------------------------------------------------- |
|
|
73
|
+
| 写入 Excel **0~1 小数列**(点击率/转化率/互动率) | 直接写入 JSON 数值(**禁止**再 ÷100) |
|
|
74
|
+
| 写客户话术 / 文案的 `x%` | `(v * 100).toFixed(2) + "%"` |
|
|
75
|
+
| `interactionRate`(字符串) | `parseFloat(row.interactionRate)` 后按数值字段使用(同样 0~1 小数) |
|
|
76
|
+
| `interactions === 0` / `null` | **平均费用**(`spend / interactions`)与 **互动率** 列填 **`—`**,禁止除零 |
|
|
77
|
+
|
|
78
|
+
### 工作簿级
|
|
79
|
+
|
|
80
|
+
| 顺序 | Sheet 名 | 数据来源 |
|
|
81
|
+
| ---: | ---------- | ------------------------------------------------------------------------------------ |
|
|
82
|
+
| 1 | `账户报告` | `campaigns` + 复盘文案(stats/overview 汇总后 Agent 撰写) |
|
|
83
|
+
| 2 | `关键词` | `keywords` |
|
|
84
|
+
| 3 | `搜索词` | `search-terms` |
|
|
85
|
+
| 4 | `设备` | **`campaign-device-*.json`**(按系列/组拆行) |
|
|
86
|
+
| 5 | `国家` | **`campaign-geo-matched-*.json`**(相符地理位置 Matched locations,按系列/地域拆行) |
|
|
87
|
+
|
|
88
|
+
### 各 Sheet 共同版式
|
|
89
|
+
|
|
90
|
+
- **R1(A1)**:报告标题(见各 Sheet 表);建议合并单元格横跨该 Sheet R3 表头全部列。
|
|
91
|
+
- **R2(A2)**:统计区间,中文可读:`YYYY年M月D日 - YYYY年M月D日`。
|
|
92
|
+
- **R3**:表头(列名、顺序须与下表一致)。
|
|
93
|
+
- **R4 起**:数据行;列宽、自动筛选、首行冻结、降序排序为可选,**不得**因此改数。
|
|
94
|
+
- **百分比列**:样表为 0~1 小数(如 7.95% 存 `0.08`);与运营约定二选一,**禁止**同一文件混用。
|
|
95
|
+
- **金额**:与 `references/analytics/account-analytics.md` 一致;`campaigns.budgetAmountYuan`、`spend`、`averageCpc`、`costPerConversion` 均为元,可直接写入。
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
### Sheet `账户报告`
|
|
100
|
+
|
|
101
|
+
| 行 | 内容 |
|
|
102
|
+
| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
103
|
+
| R1 | `广告系列报告`(如运营改名,可改文案但 Sheet 名仍为 `账户报告`) |
|
|
104
|
+
| R2 | 统计区间 |
|
|
105
|
+
| R3(A→K,11 列) | `广告系列` \| `预算` \| `费用` \| `展示次数` \| `点击次数` \| `点击率` \| `平均每次点击费用` \| `所有转化次数` \| `转化次数` \| `每次转化费用` \| `转化率` |
|
|
106
|
+
| R4… | 来自 `campaigns-*.json` 的 `items[]`(`schemaVersion 3` 行统一在 `items`):`campaignName`、`budgetAmountYuan`(元)、`spend`、`impressions`、`clicks`、`ctr`(已归一直接写入「点击率」)、`averageCpc`、`allConversions`→「所有转化次数」、`conversions`→「转化次数」、`costPerConversion`、`conversionRate`(已归一直接写入「转化率」);缺 `allConversions` 时与「转化次数」同值或填 `0` / `—`,并在脚注说明 |
|
|
107
|
+
| 末行「合计」 | **广告系列**列填 `总计`;**预算**列填 `--`;**展示 / 点击 / 所有转化次数 / 转化次数 / 费用** 做列求和;**点击率** = 合计点击 ÷ 合计展示;**转化率** = 合计转化 ÷ 合计点击(**禁止**用合计转化 ÷ 合计展示);**每次转化费用** = 合计费用 ÷ 合计转化(转化为 0 时填 `—`);禁止对各行比率取算术平均 |
|
|
108
|
+
|
|
109
|
+
表下**留白若干行**后写 **「数据复盘」**:
|
|
110
|
+
|
|
111
|
+
- 首行标题:`{结束日所在月份}月份数据复盘:`(例:`12月份数据复盘:`)。
|
|
112
|
+
- 5 条结构化要点:
|
|
113
|
+
1. **账户层级**:整体消耗、展示、点击、点击率与 3% 基准对比、询盘/转化数、平均询盘成本(数据来自 stats/overview 与上表合计)。
|
|
114
|
+
总结:
|
|
115
|
+
建议:
|
|
116
|
+
2. **关键词层级**:高转化词、高消耗低转化词、出价/竞争力建议。
|
|
117
|
+
总结:
|
|
118
|
+
建议:
|
|
119
|
+
3. **搜索字词层级**:标红/高意向词、否词与加词建议。
|
|
120
|
+
总结:
|
|
121
|
+
建议:
|
|
122
|
+
4. **设备层级**(基于 `campaign-device`):各设备在系列上的消耗/转化分布;可点出高消耗系列×设备组合。
|
|
123
|
+
总结:
|
|
124
|
+
建议:
|
|
125
|
+
5. **国家层级**(基于 `campaign-geo-matched`):各国家/地区在系列上的消耗/转化;高消耗低转化地域与降权/调价建议。
|
|
126
|
+
总结:
|
|
127
|
+
建议:
|
|
128
|
+
|
|
129
|
+
文案由 Agent 据 JSON 撰写,**不得编造**表中不存在的数字。
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
### Sheet `关键词`
|
|
134
|
+
|
|
135
|
+
| 行 | 内容 |
|
|
136
|
+
| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
137
|
+
| R1 | `搜索关键字报告` |
|
|
138
|
+
| R2 | 统计区间 |
|
|
139
|
+
| R3(A→L,12 列) | `关键字` \| `匹配类型` \| `广告系列` \| `广告组` \| `费用` \| `展示次数` \| `点击次数` \| `点击率` \| `平均每次点击费用` \| `转化次数` \| `每次转化费用` \| `转化率` |
|
|
140
|
+
| R4… | `keywords-*.json`:`keywordMatchType`→匹配类型;`campaignName` / `adGroupName` 等按 outline;`ctr` / `conversionRate` 已归一,直接写入 |
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
### Sheet `搜索词`
|
|
145
|
+
|
|
146
|
+
| 行 | 内容 |
|
|
147
|
+
| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
148
|
+
| R1 | `搜索字词报告` |
|
|
149
|
+
| R2 | 统计区间 |
|
|
150
|
+
| R3(A→N,14 列) | `搜索字词` \| `匹配类型` \| `已添加/已排除` \| `广告系列` \| `广告组` \| `关键字` \| `展示次数` \| `点击次数` \| `点击率` \| `平均每次点击费用` \| `费用` \| `转化次数` \| `每次转化费用` \| `转化率` |
|
|
151
|
+
| R4… | `search-terms-*.json`:`queryTargetingStatusZh`(`Added`→已添加、`Excluded`→已排除、`None`→都没有);无该字段时读 `queryTargetingStatus` 按上表映射,仍无则「—」;`ctr` / `conversionRate` 已归一,直接写入 |
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
### Sheet `设备`
|
|
156
|
+
|
|
157
|
+
| 行 | 内容 |
|
|
158
|
+
| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
159
|
+
| R1 | `设备报告` |
|
|
160
|
+
| R2 | 统计区间 |
|
|
161
|
+
| R3(A→M,13 列) | `设备` \| `级别` \| `广告系列` \| `出价调整` \| `展示次数` \| `点击次数` \| `点击率` \| `平均每次点击费用` \| `费用` \| `所有转化次数` \| `转化次数` \| `每次转化费用` \| `转化率` |
|
|
162
|
+
| R4… | `campaign-device-*.json`(`devices[]`):`deviceType`→设备;`campaignName` / `adGroupName`→「广告系列」等;`allConversions`→「所有转化次数」;`conversions`→「转化次数」;`ctr` / `conversionRate` 直接写入;**出价调整**:bidModifier (0.5 表示 > 降低50%, 1.1表示提高10%,在表格中分别为-50%,+10%);**级别**列按运营约定(如填 `广告系列` 或 `账户`,全文一致) |
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
### Sheet `国家`
|
|
167
|
+
|
|
168
|
+
| 行 | 内容 |
|
|
169
|
+
| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
170
|
+
| R1 | `地理位置报告` |
|
|
171
|
+
| R2 | 统计区间 |
|
|
172
|
+
| R3(A→M,13 列) | `地理位置` \| `广告系列` \| `展示次数` \| `互动次数` \| `互动率` \| `费用` \| `平均费用` \| `点击次数` \| `点击率` \| `所有转化次数` \| `转化次数` \| `每次转化费用` \| `转化率` |
|
|
173
|
+
| R4… | `campaign-geo-matched-*.json` 的 `items[]`(`schemaVersion 3` 行统一在 `items`):`countryOrRegion`→地理位置;`campaignName`→「广告系列」;`allConversions`→「所有转化次数」;`conversions`→「转化次数」;**互动次数**→`interactions`;**互动率**→`interactionRate`(字符串须解析)或 `interactions/impressions`,`interactions` 为 0 时填 `—`;**平均费用 必须** = `spend / interactions`,`interactions` 为 0 / null / undefined 时填 `—`;`ctr` / `conversionRate` 直接写入;其余列按 outline 映射 |
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## 对外客户话术(固定结构,填数来自 JSON)
|
|
178
|
+
|
|
179
|
+
首行:`统计区间:<S> ~ <E>(货币:<币种>)`
|
|
180
|
+
|
|
181
|
+
正文模板:
|
|
182
|
+
|
|
183
|
+
```
|
|
184
|
+
您好,同步一下谷歌<S>--<E>的投放数据:
|
|
185
|
+
|
|
186
|
+
1. 消耗:共消耗<金额+币种>,平均每天消耗<金额+币种>
|
|
187
|
+
2. 展示点击:带来<曝光>次曝光,<点击>个点击;
|
|
188
|
+
3. 搜索点击率 <CTR%>,<高于/低于/处于>正常水平(3%以上为正常)
|
|
189
|
+
4. CPC:<金额+币种>
|
|
190
|
+
5. 核心消费关键词:<列 Top5~10,词 + 消耗,可一句概括>
|
|
191
|
+
6. 核心消费地区:<列 Top5~10 国家/地区 + 消耗占比或消耗,可一句概括>
|
|
192
|
+
7. 询盘:<N>个<若口径为 conversions 则括号注明「转化次数」>
|
|
193
|
+
8. 账户余额:<金额+币种>(截至查询时点)
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
- **第 1 条「平均每天」**:`区间总消耗 / 区间日历天数`(含起止日),脚本计算,禁止手填。
|
|
197
|
+
- **第 3 条**:CLI 返回的若是账户整体 CTR,写「整体点击率」而非「搜索点击率」;可区分时再写「搜索点击率」。`overview-*.json`(汇总维度,`schemaVersion 3` 起整块在 `record`)的 `record.ctr` 已是 0~1 小数(如 `0.10`),话术 `x%` 用 `(ctr * 100).toFixed(2) + "%"`,**禁止**直接打印数值得到 "0.10%"。
|
|
198
|
+
- **所有金额、百分比** 一律 **2 位小数**。
|
|
199
|
+
|
|
200
|
+
---
|
|
201
|
+
|
|
202
|
+
## 复盘小结 + 优化建议(对内 / 邮件末段)
|
|
203
|
+
|
|
204
|
+
基于同一批 JSON(`campaigns`、`keywords`、`search-terms`、`campaign-device`、`campaign-geo-matched`、`overview`):
|
|
205
|
+
|
|
206
|
+
- **复盘**:3~6 条 bullet:消耗集中度、高消耗系列/词、地域与设备差异、CTR/CPC 相对水平。
|
|
207
|
+
- **优化建议**:3~5 条可执行项(预算、否词、落地页、系列状态等),**不额外拉数**;缺数据则标 `[数据不可用:原因]`。
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
## 与 `google-period-report.md` 的差异
|
|
212
|
+
|
|
213
|
+
| 项 | `google-period-report.md` | 本文 OKKI 周报 |
|
|
214
|
+
| -------- | ------------------------- | -------------------------------------------------------------------------------------------------------------- |
|
|
215
|
+
| 默认维度 | 8 维 + 主动追问追加 | **固定** `overview,campaigns,keywords,search-terms,campaign-device,campaign-geo-matched` + `stats` + `balance` |
|
|
216
|
+
| 输出形态 | 长文分析报告 | **固定话术** + 短复盘 + **多 Sheet Excel(Agent 脚本写)** |
|
|
217
|
+
| 典型用户 | 内部分析 | **发客户**的同步简报 |
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# TikTok 广告主账户 — 周期分析报告(模板纲要)
|
|
2
|
+
|
|
3
|
+
> 统计区间:`{startDate}` ~ `{endDate}`
|
|
4
|
+
> 账户:`{mediaCustomerId}`(`{mediaCustomerName}`)
|
|
5
|
+
|
|
6
|
+
数据块:总览、系列/组/广告、视频素材、受众(含性别/年龄/兴趣合并)、地域与设备(**以 `--json-out` 实际字段为准**)。
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## 1. 执行摘要(总览)
|
|
11
|
+
|
|
12
|
+
- 账户级消耗、展示、点击、转化、CTR、CPC 等(接口返回结构因版本可能略有差异)
|
|
13
|
+
- **CLI**:`siluzan-tso report tiktok-overview -a <mediaCustomerId> [--start YYYY-MM-DD --end YYYY-MM-DD] --json-out <dir>`
|
|
14
|
+
|
|
15
|
+
## 2. 广告结构(系列 / 广告组 / 广告)
|
|
16
|
+
|
|
17
|
+
- 系列:`report tiktok-campaigns` → `CampaignSectionData`(Query:`startDate`、`endDate`、`take`,默认 `take=100`)
|
|
18
|
+
- 广告组:`report tiktok-ad-groups` → `AdGroupReport`
|
|
19
|
+
- 广告:`report tiktok-ads` → `AdReport`
|
|
20
|
+
|
|
21
|
+
## 3. 素材与创意(视频)
|
|
22
|
+
|
|
23
|
+
- **CLI**:`siluzan-tso report tiktok-videos -a <id> [--start … --end …] [--take N] --json-out <dir>`
|
|
24
|
+
|
|
25
|
+
## 4. 受众分析
|
|
26
|
+
|
|
27
|
+
- 单维度:`report tiktok-audience -a <id> -d <dimension> [--take N] --json-out <dir>`
|
|
28
|
+
可选 `dimension`:`gender` | `age` | `interest_category` | `country_code` | `platform` | `language`
|
|
29
|
+
- 三块合并:`report tiktok-audience-merged`(**固定输出合并 JSON**,含 `gender` / `age` / `interest_category`)
|
|
30
|
+
|
|
31
|
+
## 5. 地域 / 兴趣辅助数据
|
|
32
|
+
|
|
33
|
+
- 地区代码枚举:`report tiktok-areacode`(解析地域报表、对照名称)
|
|
34
|
+
- 兴趣类目树:`report tiktok-interest-list -a <id>`(需配置 **`tiktokApiUrl`**)
|
|
35
|
+
|
|
36
|
+
## 6. 附录
|
|
37
|
+
|
|
38
|
+
- 日期规则:`--start` / `--end` **同传或同省略**;省略时默认**近 7 天(截至昨天)**,与 `report meta-overview`、`google-analysis` 一致。
|
|
39
|
+
- 鉴权:与 TSO 其他接口相同(`config show` 中 `tsoApiBaseUrl` / Token)。
|
|
40
|
+
- 与 steward「优化报告」区别:见 `meta-period-report.md` 末节说明;`report list/create` 为成品报告流,本模板对应**实时分析 JSON**。
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
### CLI 速查表
|
|
45
|
+
|
|
46
|
+
| 数据块 | 子命令 |
|
|
47
|
+
| ---------------------- | ------------------------------- |
|
|
48
|
+
| 总览 | `report tiktok-overview` |
|
|
49
|
+
| 系列 | `report tiktok-campaigns` |
|
|
50
|
+
| 广告组 | `report tiktok-ad-groups` |
|
|
51
|
+
| 广告 | `report tiktok-ads` |
|
|
52
|
+
| 视频素材 | `report tiktok-videos` |
|
|
53
|
+
| 受众(单维) | `report tiktok-audience -d …` |
|
|
54
|
+
| 受众(性别+年龄+兴趣) | `report tiktok-audience-merged` |
|
|
55
|
+
| 地区码 | `report tiktok-areacode` |
|
|
56
|
+
| 兴趣列表 | `report tiktok-interest-list` |
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# 网站诊断报告
|
|
2
|
+
|
|
3
|
+
> **最终交付物:一份可打开的、带图表的 HTML 文件**(如 `website-diagnosis-report.html`),不是仅 Markdown 摘要。须含:综合得分环、模块雷达图、风险/模块条形图、Lighthouse 对比图(有数据时)。
|
|
4
|
+
> 数据:`website-diagnosis collect` 落盘 JSON + Agent 按 `assets/website-diagnosis-rules.md` 生成的诊断 JSON
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
**siluzan-tso Skill / 纯 CLI 场景**:**Agent 只负责产出诊断 JSON**;终稿 HTML **必须**由 CLI 的 `render` 命令读取该 JSON 生成。**严禁** Agent 现场手写、拼接、或直接输出 HTML 作为交付物。
|
|
9
|
+
|
|
10
|
+
必须严格按以下三步顺序执行,**不得跳过任何一步**:
|
|
11
|
+
|
|
12
|
+
1. **采集原料**(拿到 Lighthouse + 首页 HTML,落盘 JSON):
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
siluzan-tso website-diagnosis collect --url <网站URL> --json-out ./out
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
2. **生成诊断 JSON**:Agent 依据上一步原料 + `assets/website-diagnosis-rules.md` 规则,产出 **诊断结果 JSON**(落盘为 `./out/diagnosis.json`,结构见下文「数据字段速查」)。**此步只能输出 JSON,不能输出 HTML。**
|
|
19
|
+
|
|
20
|
+
3. **用 JSON 调用 render 生成 HTML**(唯一允许产出 HTML 的方式):
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
siluzan-tso website-diagnosis render --data ./out/diagnosis.json [--collect ./out/collect.json] --out ./website-diagnosis-report.html
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
> 口诀:**没有诊断 JSON,就不能 render;不经过 render,就没有 HTML 交付物。**
|
|
27
|
+
|
|
28
|
+
模板源码:
|
|
29
|
+
|
|
30
|
+
- `report-templates/website-diagnosis-report.html` — 结构与样式
|
|
31
|
+
`render` 会向输出目录写入 HTML + runtime.js,并注入 `window.__WEBSITE_DIAGNOSIS__`。
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## HTML 章节清单(须全部出现)
|
|
36
|
+
|
|
37
|
+
| 区块 ID / 组件 | 内容 |
|
|
38
|
+
| ---------------- | ---------------------------------------------------------------------- |
|
|
39
|
+
| `ReportHeader` | 标题「网站诊断报告」、URL、`analyzedAt`、综合得分与等级色 |
|
|
40
|
+
| `HealthOverview` | 总分、行业对比文案、`ratingId` 说明、**ECharts 雷达图** + 得分环 |
|
|
41
|
+
| `RiskMap` | `coreIssuesIds` 列表 + **模块得分横向条形图**(对齐前端 RiskMap) |
|
|
42
|
+
| `ModuleDetail` | 6 模块 × 子项:得分、status、issue、suggestion(表格或卡片) |
|
|
43
|
+
| `PriorityPlan` | 高/中/低优先级改进计划(来自核心问题 + 低分子项) |
|
|
44
|
+
| `LoadingSpeed` | **Lighthouse 柱状对比图** + desktop/mobile 指标表;缺失时 callout 说明 |
|
|
45
|
+
| `LongtermValue` | 投放建议、长期优化价值(与 s1–s5 评级一致) |
|
|
46
|
+
|
|
47
|
+
生成前可对 JSON 做与前端相同的聚合逻辑:各模块 `score` = 子项得分之和
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## 样式与文件约定
|
|
52
|
+
|
|
53
|
+
- 单文件 HTML,`lang` 与用户语言一致(默认 `zh-CN`)。
|
|
54
|
+
- ECharts 统一引用:`https://staticpn.siluzan.com/assets/slz/homeCDN/echarts.js`(与 `report-template.html` 相同)。
|
|
55
|
+
- 落盘建议与 `--json-out` 同目录:`website-diagnosis-report.html`。
|
|
56
|
+
- **唯一生成方式**:先产出诊断 JSON,再 `siluzan-tso website-diagnosis render --data <diagnosis.json> [--collect <collect.json>]`(详见顶部「强制流程」)。
|
|
57
|
+
- **禁止**只交付 Markdown 或纯 JSON 当作最终报告(JSON 仅为 render 的输入/中间产物)。
|
|
58
|
+
- **禁止**绕过 render 直接手写或拼接 HTML。
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## 数据字段速查
|
|
63
|
+
|
|
64
|
+
| 字段 | HTML 中的用法 |
|
|
65
|
+
| --------------------------------- | -------------------------------------------------- |
|
|
66
|
+
| `url` | 报告头、页脚 |
|
|
67
|
+
| `analyzedAt` | 诊断时间 |
|
|
68
|
+
| `ratingId` | 等级徽章(s1–s5 → 优秀…不建议投放) |
|
|
69
|
+
| `score` | 总分(可由 modules 汇总) |
|
|
70
|
+
| `coreIssuesIds` | RiskMap / 优先改进 |
|
|
71
|
+
| `modules[].id` | m1–m6 分节标题 |
|
|
72
|
+
| `modules[].items[]` | 子项行:诊断项名、得分/满分、issue、suggestion |
|
|
73
|
+
| `lighthouse` / `lighthouseResult` | LoadingSpeed 节(collect payload 为 `lighthouse`) |
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## 可选附录(非必须单独成章)
|
|
78
|
+
|
|
79
|
+
- 与 Google 账户衔接:引导 `google-analysis` / 广告诊断页(勿混淆两种「诊断」)。
|
|
@@ -9,24 +9,26 @@
|
|
|
9
9
|
|
|
10
10
|
> 冲突时以 `*.md` 的内容要求为准,样式文件仅影响排版。
|
|
11
11
|
|
|
12
|
+
**图表库(全部 HTML 模板统一)**:ECharts 5 — `https://staticpn.siluzan.com/assets/slz/homeCDN/echarts.js`;初始化用 `echarts.init(el).setOption(...)`。勿使用 Chart.js。
|
|
13
|
+
|
|
12
14
|
---
|
|
13
15
|
|
|
14
16
|
## 内容纲要文件
|
|
15
17
|
|
|
16
|
-
| 文件
|
|
17
|
-
|
|
|
18
|
-
| `google-period-report.md`
|
|
19
|
-
| `google-period-report-excel.md`
|
|
20
|
-
| `google-account-diagnosis-report.md`
|
|
21
|
-
| `google-ads-diagnosis.md`
|
|
22
|
-
| `meta-period-report.md` / `.html`
|
|
23
|
-
| `meta-period-report-excel.md`
|
|
24
|
-
| `meta-account-diagnosis-report.md`
|
|
25
|
-
| `tiktok-period-report.md`
|
|
26
|
-
| `bing-period-report.md`
|
|
27
|
-
| `okki-weekly-google-client.md`
|
|
28
|
-
| `google-inquiry-analysis.md`
|
|
29
|
-
| `website-diagnosis-report.md` / `.html` | **网站诊断**:终稿为 **HTML**(对齐 TSO `WebsiteAnalysisReport/v3`);配合 `website-diagnosis collect`,见 P8
|
|
18
|
+
| 文件 | 适用场景 |
|
|
19
|
+
| --------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
|
|
20
|
+
| `google-period-report.md` | Google 账户分析报告(周期/月度/诊断均用此模板) |
|
|
21
|
+
| `google-period-report-excel.md` | **仅用户要 Excel 时**(P4 定制 Sheet):先 `*.outline.txt` 后脚本写 xlsx;账户须 `-k` 核验,无 CLI excel 子命令 |
|
|
22
|
+
| `google-account-diagnosis-report.md` | Google 账户深度诊断(健康度/转化/结构等) |
|
|
23
|
+
| `google-ads-diagnosis.md` | Google **广告诊断**完整纲要(HTML 区块、**每日趋势 2 位小数**、**每模块必填分析/建议**) |
|
|
24
|
+
| `meta-period-report.md` / `.html` | **Meta(Facebook)周期报告(默认)**:四步流程 → `facebook-analysis render` 出 HTML,见 P4-FB |
|
|
25
|
+
| `meta-period-report-excel.md` | **仅用户要 Excel 时**:5 Sheet xlsx 版式;Agent 脚本写表,无 CLI excel 子命令 |
|
|
26
|
+
| `meta-account-diagnosis-report.md` | Meta(Facebook)诊断报告(在 7 Section 内对齐 Google 诊断结构) |
|
|
27
|
+
| `tiktok-period-report.md` | TikTok 广告主周期报告 |
|
|
28
|
+
| `bing-period-report.md` | Bing(BingV2)分析报告 |
|
|
29
|
+
| `okki-weekly-google-client.md` | **OKKI 周报**:Google 发客户固定话术 + 精简维度 CLI;**Excel 仅 Agent 脚本**,见 `references/core/playbooks.md` P6 |
|
|
30
|
+
| `google-inquiry-analysis.md` | **Google 询盘分析**:严格 3 个月 + 用户询盘 + 8 Sheet xlsx,见 `references/core/playbooks.md` P7 |
|
|
31
|
+
| `website-diagnosis-report.md` / `.html` | **网站诊断**:终稿为 **HTML**(对齐 TSO `WebsiteAnalysisReport/v3`);配合 `website-diagnosis collect`,见 P8 |
|
|
30
32
|
|
|
31
33
|
---
|
|
32
34
|
|