siluzan-tso-cli 1.1.59-beta.2 → 1.1.59
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 -2
- package/dist/index.js +245 -49
- package/dist/skill/_meta.json +2 -2
- package/dist/skill/assets/google-period-report.schema.json +23 -7
- package/dist/skill/assets/pmax-create-template.json +2 -1
- package/dist/skill/assets/pmax-create-template.md +15 -1
- package/dist/skill/references/accounts/accounts-list.md +1 -1
- package/dist/skill/references/accounts/accounts-permissions.md +2 -2
- package/dist/skill/references/accounts/finance.md +1 -1
- package/dist/skill/references/accounts/open-account-by-media.md +1 -1
- package/dist/skill/references/accounts/open-account-google-ui.md +1 -1
- package/dist/skill/references/analytics/account-analytics.md +5 -5
- package/dist/skill/references/analytics/rag.md +1 -1
- package/dist/skill/references/analytics/reporting.md +5 -5
- package/dist/skill/references/core/agent-conventions.md +2 -2
- package/dist/skill/references/core/intent-routing.md +1 -1
- package/dist/skill/references/core/playbooks.md +7 -7
- package/dist/skill/references/core/setup.md +5 -5
- package/dist/skill/references/core/subagent-orchestration.md +1 -1
- package/dist/skill/references/google-ads/google-ads-write.md +1 -1
- package/dist/skill/references/google-ads/pmax-api.md +3 -1
- package/dist/skill/references/misc/tso-home.md +2 -2
- package/dist/skill/references/report-templates/google-period-report.md +24 -10
- package/dist/skill/references/report-templates/okki-weekly-google-client.md +30 -13
- package/dist/skill/report-templates/google-period-report.html +56 -1
- package/dist/skill/report-templates/google-period-report.md +24 -10
- package/dist/skill/report-templates/okki-weekly-google-client.md +30 -13
- package/dist/skill/scripts/install.ps1 +3 -3
- package/dist/skill/scripts/install.sh +3 -3
- package/dist/skill/snippets/handoff-p6-okki.md +2 -2
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# 各媒体开户
|
|
2
2
|
|
|
3
|
-
> 网页链接:`https://www
|
|
3
|
+
> 网页链接:`https://www.siluzan.com/v3/foreign_trade/tso/accountOpeningHistory?tso=%2Fv3umijs%2Ftso%2FaccountOpeningHistory`
|
|
4
4
|
> 多命令串联见 `references/core/workflows.md` § 流程一。
|
|
5
5
|
|
|
6
6
|
## Contents
|
|
@@ -65,7 +65,7 @@ siluzan-tso open-account google-wizard
|
|
|
65
65
|
|
|
66
66
|
```bash
|
|
67
67
|
siluzan-tso account-history -m Google
|
|
68
|
-
# 审核通过后:config show → https://www
|
|
68
|
+
# 审核通过后:config show → https://www.siluzan.com/v3/foreign_trade/tso/recharge/pay?mediaType=Google
|
|
69
69
|
```
|
|
70
70
|
|
|
71
71
|
---
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
## 工作流入口(线性步骤见 playbooks)
|
|
45
45
|
|
|
46
46
|
> 线性步骤见 `playbooks.md`:单户画像 **P1**、Google 周期 **P4**、Meta 周期 **P4-FB**、多账户批处理 **P5**、OKKI **P6**、询盘 **P7**。
|
|
47
|
-
> 「使用 okki 周报模板」→ **P6**(勿按默认
|
|
47
|
+
> 「使用 okki 周报模板」→ **P6**(勿按默认 10 章追问;终稿 `google-analysis okki-render`,禁止 Agent 手写 xlsx)。Google 周期 Excel(非 OKKI/询盘)→ **P4** + `report-templates/google-period-report-excel.md`。
|
|
48
48
|
|
|
49
49
|
拉数落盘:`google-analysis … --json-out <dir>`(Google)或 `yandex-analysis` / `bing-analysis` / `facebook-analysis` / `tiktok-analysis`;目录内生成 `<section>-<accountId>.json` + `manifest-<accountId>.json`(Meta/TikTok/Bing/Yandex 为 `report-manifest-<accountId>.json`)。读盘协议、交付自检与报告首行标注统一见 `references/core/agent-conventions.md` §三、§七。
|
|
50
50
|
|
|
@@ -78,17 +78,17 @@ CLI 出口的所有 JSON / 表格金额已统一为**元**,关键字段:
|
|
|
78
78
|
|
|
79
79
|
## Google 账户分析:`google-analysis` 命令
|
|
80
80
|
|
|
81
|
-
> **重要**:`google-analysis`
|
|
81
|
+
> **重要**:`google-analysis` 是统一入口,所有维度都通过 `--sections` 选取。关键词维度用 `--sections keywords`,**不要**用 `ad keywords` 代替。否词名单用 `--sections negative-keywords`,**不要**另跑 `ad keywords --negative`。涉及「今天/当天」消耗的口径见本文顶部「数据时效性」表。
|
|
82
82
|
|
|
83
83
|
```bash
|
|
84
84
|
# 单维度
|
|
85
85
|
siluzan-tso google-analysis -a <id> --sections overview --json-out <dir>
|
|
86
86
|
|
|
87
|
-
# 多维度(周期报告默认
|
|
87
|
+
# 多维度(周期报告默认 9 个拉数维,含 audience 与 negative-keywords)
|
|
88
88
|
siluzan-tso google-analysis -a <id> --start YYYY-MM-DD --end YYYY-MM-DD \
|
|
89
|
-
--sections overview,daily-metrics,dimension-summary,campaigns,devices,geographic,audience,keywords --json-out <dir>
|
|
89
|
+
--sections overview,daily-metrics,dimension-summary,campaigns,devices,geographic,audience,keywords,negative-keywords --json-out <dir>
|
|
90
90
|
|
|
91
|
-
#
|
|
91
|
+
# 全部维度(省略 --sections)
|
|
92
92
|
siluzan-tso google-analysis -a <id> --json-out <dir>
|
|
93
93
|
|
|
94
94
|
# 排除慢/不需要的维度
|
|
@@ -190,9 +190,9 @@ siluzan-tso report push receive-emails -m Google [--json-out ./snap]
|
|
|
190
190
|
|
|
191
191
|
| 媒体 | 报告类型 | URL 模板 |
|
|
192
192
|
| ------ | ---------------- | ----------------------------------------------------------- |
|
|
193
|
-
| Google | 日报(Daily) | `https://www
|
|
194
|
-
| Google | 小时报(Hourly) | `https://www
|
|
195
|
-
| TikTok | 日报 | `https://www
|
|
193
|
+
| Google | 日报(Daily) | `https://www.siluzan.com/media-report/publish/{entityId}?culture=zh-CN` |
|
|
194
|
+
| Google | 小时报(Hourly) | `https://www.siluzan.com/media-report/hour/{entityId}?culture=zh-CN` |
|
|
195
|
+
| TikTok | 日报 | `https://www.siluzan.com/media-report/publish/{entityId}?culture=zh-CN` |
|
|
196
196
|
|
|
197
197
|
`entityId` 来自 `siluzan-tso report list --json-out ./snap` 中每条记录的 `entityId` 字段。
|
|
198
198
|
|
|
@@ -205,8 +205,8 @@ siluzan-tso report list -m Google --json-out ./snap
|
|
|
205
205
|
|
|
206
206
|
# 第二步:查看 webUrl
|
|
207
207
|
siluzan-tso config show
|
|
208
|
-
# webUrl: https://www
|
|
208
|
+
# webUrl: https://www.siluzan.com
|
|
209
209
|
|
|
210
210
|
# 第三步:拼接链接(Google 日报)
|
|
211
|
-
# https://www
|
|
211
|
+
# https://www.siluzan.com/media-report/publish/rpt_abc123?culture=zh-CN
|
|
212
212
|
```
|
|
@@ -228,7 +228,7 @@
|
|
|
228
228
|
|
|
229
229
|
**A · 币种**:首行含 `统计区间:…(货币:CNY|USD)`;全文符号与 `currencyCode` 一致(CNY=¥、USD=$,未混用);与当次 `list-accounts -k` 结果相同;多账户分币种分表、无跨币种「总计」行。
|
|
230
230
|
|
|
231
|
-
**B · 结构完整**(对照当次 `report-templates/*.md`):模板要求的每一章/Sheet 都存在;无整章空白(缺数据章节写 `[ 数据不可用:… ]`,禁止编造数字填坑);优化建议独立成节、引用当次数字(Meta 周期:四问 + 3 张建议卡 + 各章 analysis/advice;Google 诊断:每模块除表格外有「分析」+「建议」);Excel 的表头列须能在当次 `*.outline.txt` 找到对应字段、产物内账户 ID = 用户当轮给出的 `mediaCustomerId`;**Excel 内全部 ID 列为文本**(见上文「写 Excel 时所有 ID 必须是文本」)。**P6**:磁盘上必须已有 `google-analysis okki-render` 写出的 `.xlsx`(禁止 Agent
|
|
231
|
+
**B · 结构完整**(对照当次 `report-templates/*.md`):模板要求的每一章/Sheet 都存在;无整章空白(缺数据章节写 `[ 数据不可用:… ]`,禁止编造数字填坑);优化建议独立成节、引用当次数字(Meta 周期:四问 + 3 张建议卡 + 各章 analysis/advice;Google 诊断:每模块除表格外有「分析」+「建议」);Excel 的表头列须能在当次 `*.outline.txt` 找到对应字段、产物内账户 ID = 用户当轮给出的 `mediaCustomerId`;**Excel 内全部 ID 列为文本**(见上文「写 Excel 时所有 ID 必须是文本」)。**P6**:磁盘上必须已有 `google-analysis okki-render` 写出的 `.xlsx`(禁止 Agent 手写表)。发给用户的话术是一个代码块,行首为「您好,同步一下谷歌」、`1、消耗:` 至 `7、账户余额:`,①②③ 各一行;禁止改成「一、二、三、四」、合成一段,或在代码块外再写结论。只有用户本轮粘贴骨架或点名增删某一条时才改被点名的行。**P7**:磁盘上必须已有 `.xlsx`。对话 Markdown 表、手写 HTML/PDF **不能**当作终稿通过自检(用户明确只要话术除外)。
|
|
232
232
|
|
|
233
233
|
**C · 数字可信**(抽样,不读大 JSON):总消耗/CPA 数量级与生成过程中脚本 stdout 打印的汇总一致(若无,补跑一次极小 `node -e` 只打印 totals);账户 ID、区间与用户需求一致;无「示例账户」「占位 123456」等模板残留;表格行数符合预期(如 P3 每个 `-a` ID 占一行)。
|
|
234
234
|
|
|
@@ -333,7 +333,7 @@
|
|
|
333
333
|
4. **行动建议**:1~3 条,点名对象并引用数据;若建议含「打开网页 / 去充值 / 去授权」,链接须遵守 §四「禁止编造平台网页地址」,**禁止**随口给一个未经验证的 URL。
|
|
334
334
|
5. **下一步**:一句邀请。客户端 suggestion chips 另展示;**不要**在 skill 各任务文档维护 chips 全文清单。
|
|
335
335
|
|
|
336
|
-
**OKKI
|
|
336
|
+
**OKKI 周报不走上面 5 步。** 最终回复只有两样:一行 xlsx 路径,加一个代码块。代码块从「您好,同步一下谷歌」开始,行首依次是 `1、消耗:`、`2、展示点击:`、`3、点击率:`、`4、平均点击单价:`、`5、转化:`、`5.1`、`5.2`、`6、优化建议:`(下面 ①②③ 各占一行)、`7、账户余额:`。只替换数字和对象,不改这些行首,不合成一段。代码块外面不要写结论、概览、发现、下周动作。用户**本轮**换了格式或贴了新全文,就用用户那一版,仍然只放这一个代码块。细则见 `okki-weekly-google-client.md`「对外客户话术」。
|
|
337
337
|
|
|
338
338
|
长任务(>30s):中间用进度短句,勿长时间沉默后突然扔大表。
|
|
339
339
|
|
|
@@ -269,7 +269,7 @@
|
|
|
269
269
|
| 用户话术(含子串即可) | 工作流 | 备注 |
|
|
270
270
|
| ------------------------------------------------------------------------------------------------------------------------------------------- | --------------- | --------------------------------------------------------- |
|
|
271
271
|
| **网址 / URL / 域名 / 官网 / 落地页** + **诊断 / 检测 / 监测 / 评估 / 体检 / 报告 / 符合投放要求 / 能不能投**(含「网络诊断」「网络检测」) | **P8** | 与 **§零** 同义;**优先 §零**;必 `website-diagnosis` CLI |
|
|
272
|
-
| `OKKI 周报` / `okki 周报` / `使用 okki 周报模板` | **P6** | **不按 P4 默认
|
|
272
|
+
| `OKKI 周报` / `okki 周报` / `使用 okki 周报模板` | **P6** | **不按 P4 默认 10 章**;写 JSON 后 `okki-render` 出 xlsx;「表格形式」= Excel,禁止对话 Markdown 表 / Agent 手写 xlsx |
|
|
273
273
|
| `Google 账户询盘分析` / `分析 … Google 账号的询盘效果`(**且有询盘附件/字段表**) | **P7** | 严格 3 个月窗口;无 CRM → 改 **§零·D / P3** |
|
|
274
274
|
| `转化成本监控` / `CPA 监控` / `谷歌ADS转化成本` / `低余额账户转化成本` | **P3(§零·D)** | `accounts-digest --max-cpa --skip-balance`;贴 `agentBrief.userDelivery` |
|
|
275
275
|
| `昨日零询盘` / `零询盘账户` / `0 转化` / `有消耗无转化`(**无 CRM 附件**) | **P3(§零·D)** | `--zero-conversions`;**不是 P7** |
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
| P1 | 单账户投放画像 | 单户拉数 + 诊断画像 |
|
|
10
10
|
| P2 | 多账户余额扫描 | 续航不足/充值预警巡检 |
|
|
11
11
|
| P3 | 多账户投放画像汇总 | accounts-digest 多户对比表 |
|
|
12
|
-
| P4 | Google 账户周期报告 | 默认
|
|
12
|
+
| P4 | Google 账户周期报告 | 默认 10 章周期汇总(含受众、否词) |
|
|
13
13
|
| P4-FB | Meta/Facebook 周期报告 | facebook-analysis 默认 5 维,默认 HTML |
|
|
14
14
|
| P5 | 多账户多维度批处理 | google-analysis-batch,禁外层 for-loop |
|
|
15
15
|
| P6 | OKKI 周报 | 写 JSON → okki-render 出 5 Sheet xlsx |
|
|
@@ -74,19 +74,19 @@
|
|
|
74
74
|
|
|
75
75
|
## P4 · Google 账户周期报告
|
|
76
76
|
|
|
77
|
-
- **触发**:Google 账户某区间的周期**数据汇总**(只要花费/转化/
|
|
77
|
+
- **触发**:Google 账户某区间的周期**数据汇总**(只要花费/转化/10 章,或用户列出 Sheet 要 **Excel**)。非 OKKI / 询盘 / **非**客户版经营报告。
|
|
78
78
|
- **不是 P10**:出现「月度报告 / 月总结与规划 / 季度报告 / Q3 汇总 / Q4 规划 / 季度汇报 / 投放季报 / 客户版 / 大族模板 / 下月规划 / 效率+区域询盘+国家明细」→ **P10**(即使带「行业参考」也不改 P9)。
|
|
79
79
|
- **必读**:`report-templates/google-period-report.md` + `references/analytics/account-analytics.md`;**要 Excel** 加 `report-templates/google-period-report-excel.md`(全文)。
|
|
80
80
|
- **步骤**:
|
|
81
81
|
1. **账户核验**:`list-accounts -m Google -k <mediaCustomerId> --json-out <dir>`;无记录则停止并告知用户。
|
|
82
82
|
2. 确认时间范围;区间 > 3 个月时分段(季度/月)。
|
|
83
|
-
3. **拉数**:用户已指定 Sheet/维度 → 只拉对应 `--sections`(见 `google-period-report-excel.md` 映射表);未指定 → 按 `google-period-report.md` 默认
|
|
83
|
+
3. **拉数**:用户已指定 Sheet/维度 → 只拉对应 `--sections`(见 `google-period-report-excel.md` 映射表);未指定 → 按 `google-period-report.md` 默认 9 个拉数维(含 `audience`、`negative-keywords`),并可并行追问可选追加。
|
|
84
84
|
4. **门禁**:对每个 section Read `<section>-<accountId>_*.outline.txt` 后再写脚本。
|
|
85
85
|
5. 脚本读盘写产物:默认 **HTML**(`report-template*.html` 版式参考);用户要 **Excel** → Agent 脚本写 xlsx(**禁止**宿主第三方 xlsx Skill;**无** CLI excel 子命令)。
|
|
86
|
-
6. 默认 HTML 报告须含:账户概览、投放趋势、Top
|
|
86
|
+
6. 默认 HTML 报告须含:账户概览、投放趋势、Top 关键词/系列/地区/受众分布、当前否词名单、优化建议;用户定制 Excel 以用户 Sheet 清单为准。
|
|
87
87
|
- **产物**:按 conventions §七 自检;`accountId` 须与用户给的 `mediaCustomerId` 一致。HTML 封面按区间写成「季度」或「月度」,对不上则仍是「周期」。不要打开 HTML 改称呼。
|
|
88
88
|
|
|
89
|
-
> 用户用「OKKI 周报」固定话术 → 改走 **P6**,不按默认
|
|
89
|
+
> 用户用「OKKI 周报」固定话术 → 改走 **P6**,不按默认 10 章追问。
|
|
90
90
|
> 只要账户级按日 Excel(无多维章节)→ **P4-DAILY**。
|
|
91
91
|
|
|
92
92
|
---
|
|
@@ -146,8 +146,8 @@
|
|
|
146
146
|
3. 同一 `--json-out` 目录执行模板命令组合:`stats`、`balance`、`google-analysis --sections overview,campaigns,keywords,search-terms,campaign-device,geo-targeted`。
|
|
147
147
|
4. 脚本读盘 → 只写 `okki-weekly-report.json` 的 `meta` + `narrative`(5 Sheet 表末分析 + 账户 Sheet 固定 5 维数据复盘;表为空也须写)。`deviceType` 是 `Desktop`/`Mobile`,禁止 `.get("DESKTOP")`,按大小写不敏感分类累加后再写设备金额。
|
|
148
148
|
5. `google-analysis okki-render --data ./okki-weekly-report.json --snapshot-dir ./snap-okki --out <xlsx>`。缺分析 / 缺 5 维复盘 / 缺 `campaign-device` 或 `geo-targeted` 会拒绝出文件;按 stderr 补 JSON 后重跑。**禁止** Agent 手写 xlsx。
|
|
149
|
-
6.
|
|
150
|
-
- **产物**:`okki-render` 写出的 `.xlsx` 路径(缺文件 = 未完成)+
|
|
149
|
+
6. **话术收口**(用户本轮没换格式时,行首一个字都不能改):先写一行 xlsx 路径,再贴一个代码块。块内从「您好,同步一下谷歌」起,依次是 `1、消耗:`、`2、展示点击:`、`3、点击率:`、`4、平均点击单价:`、`5、转化:`、`5.1`、`5.2`、`6、优化建议:` 与 ①②③ 各一行、`7、账户余额:`。只填当次数字。禁止合成一段,禁止改成「一、二、三、四」或「结论先行」。代码块外不要再写概览。用户**本轮**粘贴了新全文或点名改某一条,就按用户的来,只动被点名的行,仍然只发这一个代码块。填数规则见 `okki-weekly-google-client.md`。
|
|
150
|
+
- **产物**:`okki-render` 写出的 `.xlsx` 路径(缺文件 = 未完成)+ 上面这个代码块;**不**按 P4 默认 10 章追加。仅用户明确「只要话术 / 不要文件」时才省略 xlsx。
|
|
151
151
|
|
|
152
152
|
---
|
|
153
153
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
## 安装 CLI
|
|
11
11
|
|
|
12
12
|
```bash
|
|
13
|
-
npm install -g siluzan-tso-cli
|
|
13
|
+
npm install -g siluzan-tso-cli
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
---
|
|
@@ -64,7 +64,7 @@ siluzan-tso config set --api-key <Key> # 或 config 直接写入
|
|
|
64
64
|
siluzan-tso config set --token <Token> # 备用:设置 JWT Token
|
|
65
65
|
```
|
|
66
66
|
|
|
67
|
-
API Key 获取入口:`https://www
|
|
67
|
+
API Key 获取入口:`https://www.siluzan.com/v3/foreign_trade/settings/apiKeyManagement`
|
|
68
68
|
|
|
69
69
|
```bash
|
|
70
70
|
# 第 1 步:让用户报出手机号后,立刻发码(命令立即返回,不会等待输入)
|
|
@@ -127,9 +127,9 @@ siluzan-tso config show
|
|
|
127
127
|
|
|
128
128
|
```
|
|
129
129
|
构建环境 : production
|
|
130
|
-
apiBaseUrl : https://tso-api
|
|
131
|
-
googleApiUrl : https://googleapi
|
|
132
|
-
webUrl : https://www
|
|
130
|
+
apiBaseUrl : https://tso-api.siluzan.com
|
|
131
|
+
googleApiUrl : https://googleapi.mysiluzan.com
|
|
132
|
+
webUrl : https://www.siluzan.com
|
|
133
133
|
apiKey : abcd****1234
|
|
134
134
|
```
|
|
135
135
|
|
|
@@ -107,7 +107,7 @@ summary: <1-3 句中文,无业务数字除非来自 manifest>
|
|
|
107
107
|
1. 主 Agent:确认账户与日期区间。
|
|
108
108
|
2. **决策**:拉数阶段若日志长 → Bash/Task + `handoff-p6-okki.md` §拉数;否则主会话执行模板 §拉数命令。
|
|
109
109
|
3. **决策**:写叙事 JSON + `okki-render` → Task handoff(只读 `snapDir`,先 outline 后 JSON,见 `references/core/tips.md`);或主会话若上下文充足。**禁止** Agent 手写 xlsx。
|
|
110
|
-
4. 主 Agent
|
|
110
|
+
4. 主 Agent:最终回复只有 **xlsx 路径** + 一个话术代码块。行首用模板默认(「您好,同步一下谷歌」到 `7、账户余额:`),禁止另写「一、二、三、四」或结论摘要。用户本轮换了格式就用用户的。**没有 `.xlsx` 不得收口**(用户明确只要话术除外)。
|
|
111
111
|
|
|
112
112
|
### P5 · 多账户多维度
|
|
113
113
|
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
| 创建 | `siluzan-tso ad pmax-create --config-file ./pmax.json [--json-out ./snap-pmax]` |
|
|
70
70
|
| 复核 | `siluzan-tso ad campaigns -a <accountId> --json-out ./snap` → `channelTypeV2` 为 `PERFORMANCE_MAX` |
|
|
71
71
|
|
|
72
|
-
**PMax**:`ad pmax-create` **同步**返回 `campaignId`、`assetGroupId`、`budgetId`;无 `ad batch get/diff`。详见 `pmax-api.md`。
|
|
72
|
+
**PMax**:`ad pmax-create` **同步**返回 `campaignId`、`assetGroupId`、`budgetId`;无 `ad batch get/diff`。创建接口 400 才续跑:把比这次请求多出来的非空编号写回同一份 JSON,内容不改,再执行一次。首次创建不填这三个字段。已经 200、只是扩展或视频失败时不要再 `pmax-create`。详见 `pmax-api.md`。
|
|
73
73
|
|
|
74
74
|
**金额**:JSON 中 `budget`、`targetCpa_BidingAmount` 填主币种**元**;CLI 提交前 ×100(与 `ad campaigns` 列表 `budget` 口径一致)。
|
|
75
75
|
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
| 命令 | 说明 |
|
|
17
17
|
| ------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
|
|
18
18
|
| `ad pmax-validate` | 本地校验 |
|
|
19
|
-
| `ad pmax-create` | 创建系列(同步返回 `campaignId`
|
|
19
|
+
| `ad pmax-create` | 创建系列(同步返回 `campaignId` 等;失败时把已建成编号写回 JSON 再跑) |
|
|
20
20
|
| `ad pmax-channel-types` | 渠道类型列表 |
|
|
21
21
|
| `ad pmax-get` | 系列详情(含 `brandAssets[]`;`--json-out` 附加 `_brandGuidelinesActive`、`_agentBrandHint`) |
|
|
22
22
|
| `ad pmax-edit` | 编辑系列(预算/出价/状态;**不可**改 `brandGuidelinesEnabled`) |
|
|
@@ -211,3 +211,5 @@ Google v21+ 新建 PMax **默认开启** BG:`businessName` / Logo 挂在 **Cam
|
|
|
211
211
|
|
|
212
212
|
- 勿对 PMax 使用 `ad campaign-edit`(会 **400**)
|
|
213
213
|
- 新建勿用 `ad campaign-create`;用 `ad pmax-create`
|
|
214
|
+
- 创建接口 400 的正文是 JSON:`message` 加 `budgetId` / `campaignId` / `assetGroupId`,没建成的是 `null`。CLI 会转发 JSON 里的这三个字段;首次创建不填。只有编号比这次请求多时,才写回同一份 JSON、内容不改、再执行一次。编号按预算、系列、素材组带。默认品牌手册开启时不能只写 `campaignId`。同一步再失败时 stdout 是 `retryCreate=false`,停。不带编号再提交会新建一套
|
|
215
|
+
- 创建接口已经 200,只是附加资产或视频失败:不要再 `pmax-create`。扩展用 `ad extension`,视频用 `ad pmax-youtube-link`。stdout 是 `created=true`、`retryCreate=false`
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
siluzan-tso config show # 取 webUrl
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
首页地址:`https://www
|
|
9
|
+
首页地址:`https://www.siluzan.com/v3/foreign_trade/tso/home`
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
@@ -25,7 +25,7 @@ siluzan-tso config show # 取 webUrl
|
|
|
25
25
|
|
|
26
26
|
## 推荐话术
|
|
27
27
|
|
|
28
|
-
1. **「和首页一样的总览」** → 打开 `https://www
|
|
28
|
+
1. **「和首页一样的总览」** → 打开 `https://www.siluzan.com/v3/foreign_trade/tso/home`。
|
|
29
29
|
2. **「某个 Google 账户昨天花了多少」** → `list-accounts -m Google` + `stats -m Google -a <id>`。
|
|
30
30
|
3. **「有待充值账户」** → 说明聚合数据在首页;CLI 可 `list-accounts` + `balance` 逐户排查,或引导充值页。
|
|
31
31
|
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
| ---------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
16
16
|
| **1. 拉数** | Agent 调 CLI | `google-analysis -a <id> --start <s> --end <e> --json-out ./snap-google --sections <见下方默认维度对应 CLI>` |
|
|
17
17
|
| **2. 分析** | Agent | 用 **node/python 脚本**读落盘 JSON(勿用 Read 打开业务 `*.json`),完成筛选、聚合、排序与洞察 |
|
|
18
|
-
| **3. 写 JSON** | Agent | 按 `assets/google-period-report.schema.json` 撰写 `google-period-report.json`:只写 `meta` + `narrative`(
|
|
19
|
-
| **4. 渲染 HTML** | CLI | `google-analysis render` — **校验 narrative
|
|
18
|
+
| **3. 写 JSON** | Agent | 按 `assets/google-period-report.schema.json` 撰写 `google-period-report.json`:只写 `meta` + `narrative`(9 个数据维 + 优化建议);`kpis`/`charts`/`tables` 留给步骤 4 的 `--snapshot-dir` 合并(合并后缺 KPI 或缺否词表会拒绝出 HTML) |
|
|
19
|
+
| **4. 渲染 HTML** | CLI | `google-analysis render` — **校验 narrative 10 章必含字段**(含受众、否词),缺项报错不生成 HTML;**禁止** Agent 手写/拼接 HTML |
|
|
20
20
|
|
|
21
21
|
```bash
|
|
22
22
|
# 步骤 1
|
|
23
23
|
siluzan-tso google-analysis -a <id> --start <s> --end <e> --json-out ./snap-google \
|
|
24
|
-
--sections overview,daily-metrics,dimension-summary,campaigns,devices,geographic,audience,keywords
|
|
24
|
+
--sections overview,daily-metrics,dimension-summary,campaigns,devices,geographic,audience,keywords,negative-keywords
|
|
25
25
|
|
|
26
26
|
# 步骤 4(步骤 2~3 完成后)
|
|
27
27
|
siluzan-tso google-analysis render \
|
|
@@ -35,10 +35,10 @@ siluzan-tso google-analysis render \
|
|
|
35
35
|
- `meta`:`accountId`(必填)/ `accountName` / `currency` / `startDate` / `endDate`;可省略由 `--snapshot-dir` 从 `overview` + manifest 自动合并。
|
|
36
36
|
- `kpis`:账户级 KPI(消耗/展示/点击/转化/CTR/CPC/CPA,含可选 `previousPeriod` 环比;另含 `activeDays` / `averageDailyCost`);Agent 可省略,但 **render 合并后** `cost`/`impressions`/`clicks` 至少一项须为有效数字,否则拒绝出 HTML(避免执行摘要卡片全「—」)。本期 KPI 由 CLI 优先对 `campaigns` 全系列累加并重算比率;无 campaigns 时回退 `overview.currentPeriod`,再回退 `dimension-summary`。`activeDays` / `averageDailyCost` 来自 `overview.record` 根(**不是** `currentPeriod`);环比仍来自 `overview.previousPeriod`(上期无活跃天数,不编造)。
|
|
37
37
|
- `charts.dailyTrend`:每日趋势(`dates`/`cost`/`conversions`/`cpa`);可省略由 `daily-metrics` 自动合并。
|
|
38
|
-
- `tables.{dimensionSummary,campaigns,devices,geographic,audience,keywords}`:对应 §3~§
|
|
38
|
+
- `tables.{dimensionSummary,campaigns,devices,geographic,audience,keywords,negativeKeywords}`:对应 §3~§9 表格数据;可省略由同名 `google-analysis` section 自动合并。`negativeKeywords` 合并后必须是数组,**0 条也是 `[]`**。
|
|
39
39
|
- `narrative`(**Agent 必填,唯一由 Agent 撰写的内容**):
|
|
40
40
|
- `executiveSummary[]`:≥1 段执行摘要
|
|
41
|
-
- `sections.{overview,dailyTrend,dimensionSummary,campaigns,devices,geographic,audience,keywords}`:每个维度各 `{analysis[](≥2 条), suggestions[](≥1 条)}`,对应报告 §1~§
|
|
41
|
+
- `sections.{overview,dailyTrend,dimensionSummary,campaigns,devices,geographic,audience,keywords,negativeKeywords}`:每个维度各 `{analysis[](≥2 条), suggestions[](≥1 条)}`,对应报告 §1~§9
|
|
42
42
|
- `recommendations[]`:≥3 条跨维度优化建议,对应报告 §9
|
|
43
43
|
|
|
44
44
|
完整字段定义见 `assets/google-period-report.schema.json`。
|
|
@@ -59,7 +59,7 @@ siluzan-tso google-analysis render \
|
|
|
59
59
|
|
|
60
60
|
## 默认报告维度
|
|
61
61
|
|
|
62
|
-
生成报告时,**默认包含**以下
|
|
62
|
+
生成报告时,**默认包含**以下 10 章(9 个拉数维 + 优化建议):
|
|
63
63
|
|
|
64
64
|
| # | 维度 | CLI |
|
|
65
65
|
| --- | ---------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
|
|
@@ -71,7 +71,8 @@ siluzan-tso google-analysis render \
|
|
|
71
71
|
| 6 | 地域分布(国家/地区 消耗占比) | `google-analysis --sections geographic` |
|
|
72
72
|
| 7 | 受众分布(意向/兴趣/再营销/客户匹配等列表表现) | `google-analysis --sections audience`(默认不传 `--audience-type`,系统+自定义一起拉) |
|
|
73
73
|
| 8 | 关键词表现(词/消耗/CTR/CPC 排行) | `google-analysis --sections keywords`(这个命令获取的关键词数据会来自多个系列,不能合并去重) |
|
|
74
|
-
| 9 |
|
|
74
|
+
| 9 | 否词(当前账户已有否定关键词:词面 / 匹配 / 级别 / 系列 / 广告组) | `google-analysis --sections negative-keywords`(0 条也要落盘;名单不按本周期消耗过滤) |
|
|
75
|
+
| 10 | 优化建议(根据以上数据给出可执行改进建议) | 不额外拉数,基于已有数据撰写 |
|
|
75
76
|
|
|
76
77
|
**在执行任何数据拉取之前**,先向用户展示以下可选维度,询问是否需要追加:
|
|
77
78
|
|
|
@@ -95,17 +96,17 @@ siluzan-tso google-analysis render \
|
|
|
95
96
|
|
|
96
97
|
---
|
|
97
98
|
|
|
98
|
-
## 拉数顺序(默认
|
|
99
|
+
## 拉数顺序(默认 9 个维度)
|
|
99
100
|
|
|
100
101
|
**首选:用 `google-analysis --sections` 一次拉齐**(单进程复用 keep-alive,比逐个 spawn 快 3-7×;详见 `references/analytics/account-analytics.md` 的 `all` 子命令说明):
|
|
101
102
|
|
|
102
103
|
```bash
|
|
103
104
|
mkdir -p ./snap-google
|
|
104
105
|
siluzan-tso google-analysis -a <id> --start <s> --end <e> --json-out ./snap-google \
|
|
105
|
-
--sections overview,daily-metrics,dimension-summary,campaigns,devices,geographic,audience,keywords
|
|
106
|
+
--sections overview,daily-metrics,dimension-summary,campaigns,devices,geographic,audience,keywords,negative-keywords
|
|
106
107
|
```
|
|
107
108
|
|
|
108
|
-
如果用户**追加**了维度(按上文「可选追加」表),把它们加入 `--sections`
|
|
109
|
+
如果用户**追加**了维度(按上文「可选追加」表),把它们加入 `--sections` 即可;要全部维度则省略 `--sections`。
|
|
109
110
|
|
|
110
111
|
> 仅在调试单个维度或需要传 `all` 暂未透传的特殊参数时,才回落到逐条 `siluzan-tso google-analysis <子命令> -a <id> …` 调用。
|
|
111
112
|
|
|
@@ -134,3 +135,16 @@ siluzan-tso google-analysis -a <id> --start <s> --end <e> --json-out ./snap-goog
|
|
|
134
135
|
- 区分系统意向/兴趣 vs 再营销/客户匹配;空耗列表建议缩小或排除,高效列表建议观察后再加码。
|
|
135
136
|
- 无行时写「本期间无受众行 / 未挂受众列表」,**禁止**编造年龄段或兴趣饼。
|
|
136
137
|
- 未确认前不要写自动改出价/排除命令。
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## 否词(必写)
|
|
142
|
+
|
|
143
|
+
`negative-keywords-*.json` → `items[]`,合并后是 `tables.negativeKeywords[]`。这是**当前账户已经存在的否定关键词**(系列 / 广告组 / 账户三级),不是本周期的消耗或搜索词。
|
|
144
|
+
|
|
145
|
+
- **呈现**:词面、匹配方式、级别(`levelZh`:账户 / 系列 / 广告组)、广告系列、广告组。0 条时表格写「当前账户否词 0 条」。
|
|
146
|
+
- **分析** → `narrative.sections.negativeKeywords.{analysis,suggestions}`(≥2 / ≥1):
|
|
147
|
+
- 先写总条数,再按级别拆开。有词就点名几条;0 条就写「当前否词 0 条」。
|
|
148
|
+
- 其他章节如果建议加否词、出否词清单,必须引用这张表的条数。禁止在没拉到名单时写「账户没有否词」或只在建议里提否词。
|
|
149
|
+
- 这张表不说明该否哪些搜索词。要谈浪费搜索词,须另拉 `search-terms`,并对照本表里已有的否词。
|
|
150
|
+
- 未确认前不要执行 `ad keyword-negative-create`。
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
|
|
24
24
|
---
|
|
25
25
|
|
|
26
|
-
识别到上述意图时:**不要**再走 `google-period-report.md` 的「默认
|
|
26
|
+
识别到上述意图时:**不要**再走 `google-period-report.md` 的「默认 10 章 + 追问追加」流程;按本文固定维度拉数,`okki-render` 出 5 Sheet `.xlsx`。**先 `okki-render` 再发话术**;没有 `.xlsx` 路径不得收口。发给用户的话术默认就是下文那个代码块:只换数字,不换行首。用户本轮另给了全文或点名改某一条,才改被点名的部分。
|
|
27
27
|
|
|
28
28
|
---
|
|
29
29
|
|
|
@@ -241,13 +241,14 @@ function deviceKind(deviceType) {
|
|
|
241
241
|
|
|
242
242
|
## 对外客户话术(默认结构,填数来自 JSON)
|
|
243
243
|
|
|
244
|
-
>
|
|
244
|
+
> 话术由 Agent 填数,**不要写脚本生成**。用户没换格式时,下面代码块就是终稿:复制行首,只替换尖括号里的内容。
|
|
245
245
|
|
|
246
|
-
|
|
246
|
+
**发给用户时只有两样东西:**
|
|
247
247
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
248
|
+
1. 一行文件路径(xlsx)
|
|
249
|
+
2. 下面这一个代码块
|
|
250
|
+
|
|
251
|
+
代码块外面不要写「本周结论 / 概览 / 发现 / 下周动作」。`agent-conventions.md` 的「结论先行」五步**不用于**这次回复。
|
|
251
252
|
|
|
252
253
|
```
|
|
253
254
|
您好,同步一下谷歌<中文日期>投放的情况:
|
|
@@ -266,15 +267,31 @@ function deviceKind(deviceType) {
|
|
|
266
267
|
7、账户余额:<金额>(截至查询时点)。
|
|
267
268
|
```
|
|
268
269
|
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
**未获本轮用户改骨架时,禁止:**
|
|
270
|
+
换行是骨架的一部分。`1`~`5`、`5.1`、`5.2`、`7` 各占一行,行末用中文分号 `;`。`6、优化建议:` 单独一行,下面 **3~5 条**用 ①②③④⑤,每条一行。日期写成 `2026年4月1日-4月7日`(同年可省略结束年份),须与 `--start` / `--end` 对应。
|
|
272
271
|
|
|
273
|
-
|
|
274
|
-
- 把上一轮、另一个账户、对话里出现过的话术当成这次的骨架
|
|
275
|
-
- 用「结论先行」重写可复制块。运营摘要最多 3~5 行,放在代码块**外面**
|
|
272
|
+
**发出去之前对一下行首**(用户本轮没换格式时,缺一条或改了一个行首都重写这块,不要解释):
|
|
276
273
|
|
|
277
|
-
|
|
274
|
+
| 行首 | 必须长这样 |
|
|
275
|
+
| --- | --- |
|
|
276
|
+
| 开头 | `您好,同步一下谷歌` |
|
|
277
|
+
| 1 | `1、消耗:` |
|
|
278
|
+
| 2 | `2、展示点击:` |
|
|
279
|
+
| 3 | `3、点击率:` |
|
|
280
|
+
| 4 | `4、平均点击单价:` |
|
|
281
|
+
| 5 | `5、转化:` |
|
|
282
|
+
| 5.1 | `5.1` 且含「有转化的关键词」 |
|
|
283
|
+
| 5.2 | `5.2` 且含「有转化的国家」 |
|
|
284
|
+
| 6 | 单独一行 `6、优化建议:`,①②③ 不写在这一行 |
|
|
285
|
+
| 7 | `7、账户余额:` |
|
|
286
|
+
|
|
287
|
+
**这些都算没按格式,改回上面的行首再发:**
|
|
288
|
+
|
|
289
|
+
- 合成一段,或把 ①②③ 写进第 6 行
|
|
290
|
+
- 「一、本周概览」「二、本周发现」「三、下周优化」「四、需要您配合」
|
|
291
|
+
- 代码块前先写一段结论、要点、核心发现
|
|
292
|
+
- 沿用上一轮、另一个账户、或对话里见过的另一套话术
|
|
293
|
+
|
|
294
|
+
**用户要换格式时很好改:** 本轮粘贴了全文,或点名「不要 5.1」「第 3 条改成…」,就按用户的写,只动被点名的行。没点名的行仍用默认行首。数字仍来自当次 JSON,缺数写 `[数据不可用:原因]`。不要因为上一轮换过格式,这一轮就继续用旧骨架。
|
|
278
295
|
|
|
279
296
|
### 填数规则
|
|
280
297
|
|
|
@@ -807,6 +807,7 @@
|
|
|
807
807
|
<a href="#sec-geographic">地域分布</a>
|
|
808
808
|
<a href="#sec-audience">受众分布</a>
|
|
809
809
|
<a href="#sec-keywords">关键词</a>
|
|
810
|
+
<a href="#sec-negative-keywords">否词</a>
|
|
810
811
|
<a href="#sec-recommendations">优化建议</a>
|
|
811
812
|
</div>
|
|
812
813
|
</div>`;
|
|
@@ -1096,6 +1097,59 @@
|
|
|
1096
1097
|
</section>`;
|
|
1097
1098
|
}
|
|
1098
1099
|
|
|
1100
|
+
function renderNegativeKeywords(data) {
|
|
1101
|
+
const rows = Array.isArray(data.tables?.negativeKeywords)
|
|
1102
|
+
? data.tables.negativeKeywords
|
|
1103
|
+
: null;
|
|
1104
|
+
const section = data.narrative?.sections?.negativeKeywords;
|
|
1105
|
+
const head = sectionHead(
|
|
1106
|
+
"09",
|
|
1107
|
+
"否词",
|
|
1108
|
+
"当前账户已有否定关键词(系列 / 广告组 / 账户),不是本周期消耗",
|
|
1109
|
+
);
|
|
1110
|
+
const levelOrder = { 账户: 0, 系列: 1, 广告组: 2 };
|
|
1111
|
+
const sorted =
|
|
1112
|
+
rows == null
|
|
1113
|
+
? []
|
|
1114
|
+
: [...rows].sort((a, b) => {
|
|
1115
|
+
const la = levelOrder[a.levelZh] ?? 9;
|
|
1116
|
+
const lb = levelOrder[b.levelZh] ?? 9;
|
|
1117
|
+
if (la !== lb) return la - lb;
|
|
1118
|
+
return String(a.keyword || "").localeCompare(String(b.keyword || ""));
|
|
1119
|
+
});
|
|
1120
|
+
const shown = sorted.slice(0, 100);
|
|
1121
|
+
const body = shown
|
|
1122
|
+
.map(
|
|
1123
|
+
(r) => `
|
|
1124
|
+
<tr>
|
|
1125
|
+
<td>${escapeHtml(r.keyword || "—")}</td>
|
|
1126
|
+
<td>${escapeHtml(r.matchType || "—")}</td>
|
|
1127
|
+
<td>${escapeHtml(r.levelZh || r.level || "—")}</td>
|
|
1128
|
+
<td>${escapeHtml(r.campaignName || "—")}</td>
|
|
1129
|
+
<td>${escapeHtml(r.adGroupName || "—")}</td>
|
|
1130
|
+
</tr>`,
|
|
1131
|
+
)
|
|
1132
|
+
.join("");
|
|
1133
|
+
const table =
|
|
1134
|
+
rows == null
|
|
1135
|
+
? '<div class="empty-note">数据不可用:negative-keywords 未拉取</div>'
|
|
1136
|
+
: shown.length > 0
|
|
1137
|
+
? `<div class="table-wrap"><table>
|
|
1138
|
+
<thead><tr><th>否词</th><th>匹配方式</th><th>级别</th><th>广告系列</th><th>广告组</th></tr></thead>
|
|
1139
|
+
<tbody>${body}</tbody>
|
|
1140
|
+
</table></div>
|
|
1141
|
+
<div class="card-title-row" style="margin-top:10px"><span class="hint">当前否词 ${rows.length} 条,表格最多展示 100 条</span></div>`
|
|
1142
|
+
: '<div class="empty-note">当前账户否词 0 条</div>';
|
|
1143
|
+
return `
|
|
1144
|
+
<section id="sec-negative-keywords">
|
|
1145
|
+
${head}
|
|
1146
|
+
<div class="card">
|
|
1147
|
+
${table}
|
|
1148
|
+
${analysisBlock(section)}
|
|
1149
|
+
</div>
|
|
1150
|
+
</section>`;
|
|
1151
|
+
}
|
|
1152
|
+
|
|
1099
1153
|
function renderRecommendations(data) {
|
|
1100
1154
|
const recs = Array.isArray(data.narrative?.recommendations)
|
|
1101
1155
|
? data.narrative.recommendations
|
|
@@ -1116,7 +1170,7 @@
|
|
|
1116
1170
|
: '<div class="empty-note">(待 Agent 撰写优化建议)</div>';
|
|
1117
1171
|
return `
|
|
1118
1172
|
<section id="sec-recommendations">
|
|
1119
|
-
${sectionHead("
|
|
1173
|
+
${sectionHead("10", "优化建议", "综合以上数据的可执行改进建议")}
|
|
1120
1174
|
<div class="card">${body}</div>
|
|
1121
1175
|
</section>`;
|
|
1122
1176
|
}
|
|
@@ -1397,6 +1451,7 @@
|
|
|
1397
1451
|
renderGeographic(data),
|
|
1398
1452
|
renderAudience(data),
|
|
1399
1453
|
renderKeywords(data),
|
|
1454
|
+
renderNegativeKeywords(data),
|
|
1400
1455
|
renderRecommendations(data),
|
|
1401
1456
|
renderFooter(data),
|
|
1402
1457
|
].join("\n");
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
| ---------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
16
16
|
| **1. 拉数** | Agent 调 CLI | `google-analysis -a <id> --start <s> --end <e> --json-out ./snap-google --sections <见下方默认维度对应 CLI>` |
|
|
17
17
|
| **2. 分析** | Agent | 用 **node/python 脚本**读落盘 JSON(勿用 Read 打开业务 `*.json`),完成筛选、聚合、排序与洞察 |
|
|
18
|
-
| **3. 写 JSON** | Agent | 按 `assets/google-period-report.schema.json` 撰写 `google-period-report.json`:只写 `meta` + `narrative`(
|
|
19
|
-
| **4. 渲染 HTML** | CLI | `google-analysis render` — **校验 narrative
|
|
18
|
+
| **3. 写 JSON** | Agent | 按 `assets/google-period-report.schema.json` 撰写 `google-period-report.json`:只写 `meta` + `narrative`(9 个数据维 + 优化建议);`kpis`/`charts`/`tables` 留给步骤 4 的 `--snapshot-dir` 合并(合并后缺 KPI 或缺否词表会拒绝出 HTML) |
|
|
19
|
+
| **4. 渲染 HTML** | CLI | `google-analysis render` — **校验 narrative 10 章必含字段**(含受众、否词),缺项报错不生成 HTML;**禁止** Agent 手写/拼接 HTML |
|
|
20
20
|
|
|
21
21
|
```bash
|
|
22
22
|
# 步骤 1
|
|
23
23
|
siluzan-tso google-analysis -a <id> --start <s> --end <e> --json-out ./snap-google \
|
|
24
|
-
--sections overview,daily-metrics,dimension-summary,campaigns,devices,geographic,audience,keywords
|
|
24
|
+
--sections overview,daily-metrics,dimension-summary,campaigns,devices,geographic,audience,keywords,negative-keywords
|
|
25
25
|
|
|
26
26
|
# 步骤 4(步骤 2~3 完成后)
|
|
27
27
|
siluzan-tso google-analysis render \
|
|
@@ -35,10 +35,10 @@ siluzan-tso google-analysis render \
|
|
|
35
35
|
- `meta`:`accountId`(必填)/ `accountName` / `currency` / `startDate` / `endDate`;可省略由 `--snapshot-dir` 从 `overview` + manifest 自动合并。
|
|
36
36
|
- `kpis`:账户级 KPI(消耗/展示/点击/转化/CTR/CPC/CPA,含可选 `previousPeriod` 环比;另含 `activeDays` / `averageDailyCost`);Agent 可省略,但 **render 合并后** `cost`/`impressions`/`clicks` 至少一项须为有效数字,否则拒绝出 HTML(避免执行摘要卡片全「—」)。本期 KPI 由 CLI 优先对 `campaigns` 全系列累加并重算比率;无 campaigns 时回退 `overview.currentPeriod`,再回退 `dimension-summary`。`activeDays` / `averageDailyCost` 来自 `overview.record` 根(**不是** `currentPeriod`);环比仍来自 `overview.previousPeriod`(上期无活跃天数,不编造)。
|
|
37
37
|
- `charts.dailyTrend`:每日趋势(`dates`/`cost`/`conversions`/`cpa`);可省略由 `daily-metrics` 自动合并。
|
|
38
|
-
- `tables.{dimensionSummary,campaigns,devices,geographic,audience,keywords}`:对应 §3~§
|
|
38
|
+
- `tables.{dimensionSummary,campaigns,devices,geographic,audience,keywords,negativeKeywords}`:对应 §3~§9 表格数据;可省略由同名 `google-analysis` section 自动合并。`negativeKeywords` 合并后必须是数组,**0 条也是 `[]`**。
|
|
39
39
|
- `narrative`(**Agent 必填,唯一由 Agent 撰写的内容**):
|
|
40
40
|
- `executiveSummary[]`:≥1 段执行摘要
|
|
41
|
-
- `sections.{overview,dailyTrend,dimensionSummary,campaigns,devices,geographic,audience,keywords}`:每个维度各 `{analysis[](≥2 条), suggestions[](≥1 条)}`,对应报告 §1~§
|
|
41
|
+
- `sections.{overview,dailyTrend,dimensionSummary,campaigns,devices,geographic,audience,keywords,negativeKeywords}`:每个维度各 `{analysis[](≥2 条), suggestions[](≥1 条)}`,对应报告 §1~§9
|
|
42
42
|
- `recommendations[]`:≥3 条跨维度优化建议,对应报告 §9
|
|
43
43
|
|
|
44
44
|
完整字段定义见 `assets/google-period-report.schema.json`。
|
|
@@ -59,7 +59,7 @@ siluzan-tso google-analysis render \
|
|
|
59
59
|
|
|
60
60
|
## 默认报告维度
|
|
61
61
|
|
|
62
|
-
生成报告时,**默认包含**以下
|
|
62
|
+
生成报告时,**默认包含**以下 10 章(9 个拉数维 + 优化建议):
|
|
63
63
|
|
|
64
64
|
| # | 维度 | CLI |
|
|
65
65
|
| --- | ---------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
|
|
@@ -71,7 +71,8 @@ siluzan-tso google-analysis render \
|
|
|
71
71
|
| 6 | 地域分布(国家/地区 消耗占比) | `google-analysis --sections geographic` |
|
|
72
72
|
| 7 | 受众分布(意向/兴趣/再营销/客户匹配等列表表现) | `google-analysis --sections audience`(默认不传 `--audience-type`,系统+自定义一起拉) |
|
|
73
73
|
| 8 | 关键词表现(词/消耗/CTR/CPC 排行) | `google-analysis --sections keywords`(这个命令获取的关键词数据会来自多个系列,不能合并去重) |
|
|
74
|
-
| 9 |
|
|
74
|
+
| 9 | 否词(当前账户已有否定关键词:词面 / 匹配 / 级别 / 系列 / 广告组) | `google-analysis --sections negative-keywords`(0 条也要落盘;名单不按本周期消耗过滤) |
|
|
75
|
+
| 10 | 优化建议(根据以上数据给出可执行改进建议) | 不额外拉数,基于已有数据撰写 |
|
|
75
76
|
|
|
76
77
|
**在执行任何数据拉取之前**,先向用户展示以下可选维度,询问是否需要追加:
|
|
77
78
|
|
|
@@ -95,17 +96,17 @@ siluzan-tso google-analysis render \
|
|
|
95
96
|
|
|
96
97
|
---
|
|
97
98
|
|
|
98
|
-
## 拉数顺序(默认
|
|
99
|
+
## 拉数顺序(默认 9 个维度)
|
|
99
100
|
|
|
100
101
|
**首选:用 `google-analysis --sections` 一次拉齐**(单进程复用 keep-alive,比逐个 spawn 快 3-7×;详见 `references/analytics/account-analytics.md` 的 `all` 子命令说明):
|
|
101
102
|
|
|
102
103
|
```bash
|
|
103
104
|
mkdir -p ./snap-google
|
|
104
105
|
siluzan-tso google-analysis -a <id> --start <s> --end <e> --json-out ./snap-google \
|
|
105
|
-
--sections overview,daily-metrics,dimension-summary,campaigns,devices,geographic,audience,keywords
|
|
106
|
+
--sections overview,daily-metrics,dimension-summary,campaigns,devices,geographic,audience,keywords,negative-keywords
|
|
106
107
|
```
|
|
107
108
|
|
|
108
|
-
如果用户**追加**了维度(按上文「可选追加」表),把它们加入 `--sections`
|
|
109
|
+
如果用户**追加**了维度(按上文「可选追加」表),把它们加入 `--sections` 即可;要全部维度则省略 `--sections`。
|
|
109
110
|
|
|
110
111
|
> 仅在调试单个维度或需要传 `all` 暂未透传的特殊参数时,才回落到逐条 `siluzan-tso google-analysis <子命令> -a <id> …` 调用。
|
|
111
112
|
|
|
@@ -134,3 +135,16 @@ siluzan-tso google-analysis -a <id> --start <s> --end <e> --json-out ./snap-goog
|
|
|
134
135
|
- 区分系统意向/兴趣 vs 再营销/客户匹配;空耗列表建议缩小或排除,高效列表建议观察后再加码。
|
|
135
136
|
- 无行时写「本期间无受众行 / 未挂受众列表」,**禁止**编造年龄段或兴趣饼。
|
|
136
137
|
- 未确认前不要写自动改出价/排除命令。
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## 否词(必写)
|
|
142
|
+
|
|
143
|
+
`negative-keywords-*.json` → `items[]`,合并后是 `tables.negativeKeywords[]`。这是**当前账户已经存在的否定关键词**(系列 / 广告组 / 账户三级),不是本周期的消耗或搜索词。
|
|
144
|
+
|
|
145
|
+
- **呈现**:词面、匹配方式、级别(`levelZh`:账户 / 系列 / 广告组)、广告系列、广告组。0 条时表格写「当前账户否词 0 条」。
|
|
146
|
+
- **分析** → `narrative.sections.negativeKeywords.{analysis,suggestions}`(≥2 / ≥1):
|
|
147
|
+
- 先写总条数,再按级别拆开。有词就点名几条;0 条就写「当前否词 0 条」。
|
|
148
|
+
- 其他章节如果建议加否词、出否词清单,必须引用这张表的条数。禁止在没拉到名单时写「账户没有否词」或只在建议里提否词。
|
|
149
|
+
- 这张表不说明该否哪些搜索词。要谈浪费搜索词,须另拉 `search-terms`,并对照本表里已有的否词。
|
|
150
|
+
- 未确认前不要执行 `ad keyword-negative-create`。
|