siluzan-tso-cli 1.1.72 → 1.1.73-beta.2

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.
Files changed (48) hide show
  1. package/README.md +2 -1
  2. package/dist/index.js +2530 -1258
  3. package/dist/skill/SKILL.md +3 -2
  4. package/dist/skill/_meta.json +2 -2
  5. package/dist/skill/assets/campaign-create-keyword-test.fixed.json +2 -2
  6. package/dist/skill/assets/campaign-create-keyword-test.json +2 -2
  7. package/dist/skill/assets/campaign-create-template.json +2 -2
  8. package/dist/skill/assets/campaign-create-template.md +14 -2
  9. package/dist/skill/references/README.md +1 -0
  10. package/dist/skill/references/accounts/accounts-list.md +1 -1
  11. package/dist/skill/references/accounts/accounts-permissions.md +2 -2
  12. package/dist/skill/references/accounts/finance.md +1 -1
  13. package/dist/skill/references/accounts/open-account-by-media.md +1 -1
  14. package/dist/skill/references/accounts/open-account-google-ui.md +1 -1
  15. package/dist/skill/references/analytics/account-analytics.md +18 -2
  16. package/dist/skill/references/analytics/google-analysis-batch.md +5 -3
  17. package/dist/skill/references/analytics/rag.md +1 -1
  18. package/dist/skill/references/analytics/reporting.md +5 -5
  19. package/dist/skill/references/core/agent-conventions.md +3 -1
  20. package/dist/skill/references/core/cli-enums.md +30 -20
  21. package/dist/skill/references/core/intent-routing.md +2 -1
  22. package/dist/skill/references/core/playbooks.md +12 -5
  23. package/dist/skill/references/core/setup.md +5 -5
  24. package/dist/skill/references/google-ads/google-ads-campaign-plan.md +3 -2
  25. package/dist/skill/references/google-ads/google-ads-read.md +9 -1
  26. package/dist/skill/references/google-ads/google-ads-write.md +83 -39
  27. package/dist/skill/references/google-ads/google-ads.md +22 -19
  28. package/dist/skill/references/google-ads/rules/google-ads-plan-source-fidelity.md +5 -0
  29. package/dist/skill/references/misc/tso-home.md +2 -2
  30. package/dist/skill/references/report-templates/README.md +1 -0
  31. package/dist/skill/references/report-templates/google-account-diagnosis-report.md +1 -1
  32. package/dist/skill/references/report-templates/google-ads-diagnosis.md +2 -2
  33. package/dist/skill/references/report-templates/google-daily-report-excel.md +45 -0
  34. package/dist/skill/references/report-templates/google-period-report-excel.md +1 -1
  35. package/dist/skill/references/report-templates/google-period-report.md +3 -3
  36. package/dist/skill/references/report-templates/okki-weekly-google-client.md +4 -4
  37. package/dist/skill/report-templates/README.md +1 -0
  38. package/dist/skill/report-templates/google-account-diagnosis-report.md +1 -1
  39. package/dist/skill/report-templates/google-ads-diagnosis.md +2 -2
  40. package/dist/skill/report-templates/google-daily-report-excel.md +45 -0
  41. package/dist/skill/report-templates/google-period-report-excel.md +1 -1
  42. package/dist/skill/report-templates/google-period-report.html +31 -4
  43. package/dist/skill/report-templates/google-period-report.md +3 -3
  44. package/dist/skill/report-templates/okki-weekly-google-client.md +4 -4
  45. package/dist/skill/scripts/install.ps1 +3 -3
  46. package/dist/skill/scripts/install.sh +3 -3
  47. package/dist/skill/snippets/handoff-p5-batch.md +1 -1
  48. package/package.json +1 -1
@@ -62,14 +62,14 @@
62
62
 
63
63
  > **与 Search / PMax 隔离**:只用 `ad demand-gen`。网关与硬规则见 `references/google-ads/demand-gen-api.md`。模板 `assets/demand-gen-create-template.json`。金额填元。创建结果永远是暂停,不要启用,除非用户明确要花钱。
64
64
 
65
- | 步骤 | 命令 |
66
- | ---- | ---- |
65
+ | 步骤 | 命令 |
66
+ | -------------- | ----------------------------------------------------------------------------- |
67
67
  | 能否按转化出价 | `ad demand-gen conversions -a <accountId>`。没有可出价询盘就用 `TARGET_SPEND` |
68
- | 最低预算 | `ad demand-gen minimum-budget -a <accountId>` |
69
- | 地域 | `ad geo search -a <accountId> -q "<地区名>"` |
70
- | 校验 | `ad demand-gen validate -a <accountId> --config-file ./dg.json` |
71
- | 创建 | `ad demand-gen create -a <accountId> --config-file ./dg.json` |
72
- | 读回 | `ad demand-gen get -a <accountId> --campaign-id <id>` |
68
+ | 最低预算 | `ad demand-gen minimum-budget -a <accountId>` |
69
+ | 地域 | `ad geo search -a <accountId> -q "<地区名>"` |
70
+ | 校验 | `ad demand-gen validate -a <accountId> --config-file ./dg.json` |
71
+ | 创建 | `ad demand-gen create -a <accountId> --config-file ./dg.json` |
72
+ | 读回 | `ad demand-gen get -a <accountId> --campaign-id <id>` |
73
73
 
74
74
  ---
75
75
 
@@ -99,22 +99,22 @@
99
99
 
100
100
  ### 已上线 PMax 管理(CLI)
101
101
 
102
- | 能力 | 命令 |
103
- | ---------------- | ----------------------------------------------------------------------------------------------------------------------------- |
104
- | 详情 | `ad pmax-get -a <id> --campaign-id <cid>`(读 `_brandGuidelinesActive`) |
102
+ | 能力 | 命令 |
103
+ | ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
104
+ | 详情 | `ad pmax-get -a <id> --campaign-id <cid>`(读 `_brandGuidelinesActive`) |
105
105
  | 改活动 | `ad pmax-edit`(`--patch-file` 或 `--status` / `--budget` + `--budget-id`;`assetAutomationSettings` 只改提交类型;`textGuidelines` 未传不写、传 `{}` 清空;改 `Removed` 须用户同意 + `--i-confirm`) |
106
- | 改 Campaign 品牌 | `ad pmax-brand-assets-edit`(BG 已开启) |
107
- | 启用 BG | `ad pmax-brand-guidelines-enable --config-file …`(存量活动) |
108
- | 新资产组 | `ad pmax-asset-group-create --config-file …`(BG 下自动省略品牌) |
109
- | 改资产组 | `ad pmax-asset-group-edit` |
110
- | 删资产组 | `ad pmax-asset-group-edit --status REMOVED`(软删;网关无 DELETE 端点。最后一组会 400,应暂停该组或系列) |
111
- | 改资产 | `ad pmax-assets-update --config-file …` |
112
- | YouTube 追加 | `ad pmax-youtube-link`(单条 `--youtube` / `--video-path`);批量见 `ad pmax-assets-update` |
113
- | 信号 | `ad pmax-signals-get` / `ad pmax-signals-set`;受众下拉 `ad pmax-audiences` |
114
- | 附加资产 | `ad extension pmax-types`;`callout` / `snippet` / `lead-form` / `whatsapp`(见 `pmax-api.md` § 附加资产) |
115
- | 图片库 | `ad pmax-image-upload` |
116
- | 报表 | `ad pmax-report-asset-groups` / `ad pmax-report-assets` / `ad pmax-report-geo` / `ad pmax-report-channels`(单素材与素材组不必相等;素材点击可大于系列点击;渠道合计只含各网络) |
117
- | 删活动 | 用户同意后 `ad campaign-delete -a <id> --id <campaignId> --i-confirm --commit "…"`(与 Search 共用;勿用 `ad campaign-edit`) |
106
+ | 改 Campaign 品牌 | `ad pmax-brand-assets-edit`(BG 已开启) |
107
+ | 启用 BG | `ad pmax-brand-guidelines-enable --config-file …`(存量活动) |
108
+ | 新资产组 | `ad pmax-asset-group-create --config-file …`(BG 下自动省略品牌) |
109
+ | 改资产组 | `ad pmax-asset-group-edit` |
110
+ | 删资产组 | `ad pmax-asset-group-edit --status REMOVED`(软删;网关无 DELETE 端点。最后一组会 400,应暂停该组或系列) |
111
+ | 改资产 | `ad pmax-assets-update --config-file …` |
112
+ | YouTube 追加 | `ad pmax-youtube-link`(单条 `--youtube` / `--video-path`);批量见 `ad pmax-assets-update` |
113
+ | 信号 | `ad pmax-signals-get` / `ad pmax-signals-set`;受众下拉 `ad pmax-audiences` |
114
+ | 附加资产 | `ad extension pmax-types`;`callout` / `snippet` / `lead-form` / `whatsapp`(见 `pmax-api.md` § 附加资产) |
115
+ | 图片库 | `ad pmax-image-upload` |
116
+ | 报表 | `ad pmax-report-asset-groups` / `ad pmax-report-assets` / `ad pmax-report-geo` / `ad pmax-report-channels`(单素材与素材组不必相等;素材点击可大于系列点击;渠道合计只含各网络) |
117
+ | 删活动 | 用户同意后 `ad campaign-delete -a <id> --id <campaignId> --i-confirm --commit "…"`(与 Search 共用;勿用 `ad campaign-edit`) |
118
118
 
119
119
  模板与 HTTP 对照:`references/google-ads/pmax-api.md`。
120
120
 
@@ -192,8 +192,12 @@ siluzan-tso ad batch diff --batch-id <taskId> --config-file ./campaign.json --js
192
192
  - 缺词:`ad keyword-create`(词面格式同 JSON `KeywordsForBatchJob`)
193
193
  - 缺 RSA:`ad ad-create`(`--headlines` / `--descriptions` 从 JSON `AdsForBatchJob` 抄)
194
194
  - **缺投放国家/地域**:**自动**执行 `ad geo add -a <account> --campaign-id <id> --location-id <geoId>`(`layer=location` 的 `remediateCommand`)
195
+ - **位置选项与计划不一致**(`issue=mismatch`,报告写「与计划不一致:计划 仅所在地,线上 所在地或感兴趣」):**自动**执行 `remediateCommand`(`ad campaign-edit --geo-target-type …` / `--negative-geo-target-type …`)
196
+ - **线上多了计划外的地域**(`issue=unplanned`):没有 `remediateCommand`。列给用户,问删掉(`ad geo remove`)还是补进方案,**禁止**自行删除
195
197
  - **缺附加信息(常见)**:**自动**执行 `ad extension sitelink` / `callout` / `call` / `snippet`(见下节);`batch diff` 输出含 `补建:` 行或 `--json-out` 的 `missing[].remediateCommand`
196
- 补建前可用 `ad groups` / `ad keywords` / `ad geo list --mode targeted` / `ad extension list` 核对账户现状。
198
+ 补建前可用 `ad groups` / `ad keywords` / `ad geo list --mode targeted` / `ad extension list --campaign-id <id>` 核对账户现状。
199
+ 附加信息项为 `skipped`(「附加信息未比对」)时没有 `remediateCommand`:说明线上条数没法确认,**禁止**手动补建,否则会重复挂载;向用户说明后用 `ad extension list --campaign-id` 或后台核对。
200
+ `extensionDuplicates[]` 非空(报告里有「重复挂载的附加信息」):同一内容挂了多份,请用户在后台删掉多余的,**禁止**自行删除或再补建。
197
201
 
198
202
  ### 创建失败时禁止的做法(Agent 必遵)
199
203
 
@@ -213,14 +217,22 @@ BatchJob 常漏 **附加信息**(Sitelink)与 **投放地域**;系列/组/
213
217
 
214
218
  1. `ad campaign-create` / `ad batch get` 的 `--json-out` 落盘含 **`agentWorkflow`**:读 `nextCommand` / `shouldRunBatchDiff` / `agentHint`(人读提示在 `--json-out` 早退时不可见)。
215
219
  2. 跑 `ad batch diff`;stdout 含 `BEGIN_USER_DELIVERY_MARKDOWN`…`END`——**立刻原样发给用户**(先于补建)。
216
- 3. 对 `missing[]` 中带 `remediateCommand` 的项**直接执行**(`location` → `ad geo add`;`extension` → `ad extension *`)。
220
+ 3. 对 `missing[]` 中带 `remediateCommand` 的项**直接执行**(`location` → `ad geo add` 或 `ad campaign-edit --geo-target-type`;`extension` → `ad extension *`)。
217
221
  4. 扩展字段映射:`Properties.Text` + `DestinationUrl` → `ad extension sitelink`;`CALLOUT` → `callout`;`CALL` → `call`;`STRUCTURED_SNIPPET` → `snippet`。
218
222
  5. 有缺失时 CLI **exit 2**;补建后再跑一次 `ad batch diff`,直到 `ok===true`;可再发更新版详情。
219
223
  6. 可简短补充已补挂条数(**不能代替**步骤 2 的 Markdown 全文)。**禁止**只说「已创建成功 / 详情已交付」或只复述「未发现缺失」。见 `agent-conventions.md` §四。
220
224
 
221
225
  完整流水线见 `references/google-ads/google-ads-campaign-plan.md` § batch diff 后自动补建。
222
226
 
223
- **`ad batch diff` 比对维度:**系列是否存在 → **`targetedLocations`(投放国家/地域 id)** → 各 `AdGroupsForBatchJob[].Name` → 组内**每条**关键词(匹配类型+词面)→ RSA **每条**标题/描述(及整条 RSA)→ 系列**每条**否定词 → 附加信息条数。`--json-out` 含 `ok` / `items[]` / `statusCounts` / `missing` / **`reportMarkdown`** / **`reportMarkdownFile`** / `agentHint` / `counts`。另写 Markdown 文件(`--md-out`,默认与 json-out 同目录)。
227
+ ### 改过地区以后(Agent 必遵)
228
+
229
+ 只要动过投放地区或位置选项(`ad geo add` / `ad geo remove`、`ad campaign-edit --geo-target-type` / `--negative-geo-target-type`,包括 batch diff 补建),都要:
230
+
231
+ 1. 用户要求换国家时,先把计划 JSON 的 `locations` / `targetedLocations` / `excludedLocations` / `PositiveGeoTargetTypeV2` 改成用户现在要的,否则 diff 还在对照旧方案。
232
+ 2. 重跑 `ad batch diff --campaign-id <id> --config-file <改后的 JSON> --json-out …`。
233
+ 3. 把新输出的 `BEGIN_USER_DELIVERY_MARKDOWN`…`END` 全文发给用户。之前发过的报告已经过时,不能拿来代替,也不能只说「已改好」。
234
+
235
+ **`ad batch diff` 比对维度:**系列是否存在 → **`targetedLocations`(投放国家/地域 id,含线上多出的计划外地域)** → **位置选项**(`PositiveGeoTargetTypeV2` / `NegativeGeoTargetTypeV2`,计划没写按 Presence 比)→ 各 `AdGroupsForBatchJob[].Name` → 组内**每条**关键词(匹配类型+词面)→ RSA **每条**标题/描述(及整条 RSA)→ 系列**每条**否定词 → 附加信息条数。`--json-out` 含 `ok` / `items[]` / `statusCounts` / `missing` / **`reportMarkdown`** / **`reportMarkdownFile`** / `agentHint` / `counts`。另写 Markdown 文件(`--md-out`,默认与 json-out 同目录)。
224
236
 
225
237
  **`ad batch get` 输出:**摘要表 + `reason`/`errors`;`--json-out` 另含 **`agentWorkflow`**(`nextCommand` 指向 batch diff 或继续轮询)。
226
238
 
@@ -253,7 +265,9 @@ siluzan-tso ad campaign-edit \
253
265
  [--name <新名称>] [--budget <主币种>] [--bidding <策略>] \
254
266
  [--bid-ceiling <主币种>] [--target-cpa <主币种>] [--target-roas <倍数>] \
255
267
  [--manual-ecpc true|false] \
256
- [--search-network true|false] [--content-network true|false]
268
+ [--search-network true|false] [--content-network true|false] \
269
+ [--geo-target-type presence|presence-or-interest|search-interest] \
270
+ [--negative-geo-target-type presence|presence-or-interest]
257
271
  ```
258
272
 
259
273
  | `--bidding` | 须配合 |
@@ -280,11 +294,23 @@ siluzan-tso ad campaign-edit -a <accountId> --id <campaignId> \
280
294
 
281
295
  相对运算:先 `ad campaigns --json-out ./snap` 读 `budget`、`targetSpendBidCeilingYuan`、`targetCpaAmountYuan`(都已是元)和 `biddingStrategyTypeV2`,再传入。不要读 `targetSpend_BidCeilingAmount` / `targetCpa_BidingAmount`(仍是分)。
282
296
 
283
- `campaign-edit` 的名称、预算、出价、投放网络,以及 `campaign-status`,走字段级 PATCH(`writeScope=search-field-patch`)。请求只带本次传入的字段,没传的字段保持原样。金额仍是主币种元,CLI ×100 写入网关「分」。`--search-network` / `--content-network` 传 `true` 或 `false`,关闭传 `false`,不能传空。`budgetShared=true` 时本命令直接拒绝 `--budget`。改共享预算用 `ad shared-budget`,不要改这一条系列的日预算字段。PMax 不要用本命令。
297
+ **位置选项**(Google 后台「地理位置 → 位置选项」):
298
+
299
+ | 参数 | 含义 |
300
+ | ----------------------------------------- | ---------------------------------------------------------- |
301
+ | `--geo-target-type presence` | 仅所在地:只有身处目标地区的人看到广告(创建默认) |
302
+ | `--geo-target-type presence-or-interest` | 所在地或兴趣:身处目标地区,或在别处关注目标地区的人 |
303
+ | `--geo-target-type search-interest` | 搜索兴趣:搜索目标地区相关内容的人 |
304
+ | `--negative-geo-target-type presence` | 排除身处排除地区的人(创建默认) |
305
+ | `--negative-geo-target-type presence-or-interest` | 身处或关注排除地区的人都排除 |
306
+
307
+ 用户说「广告出现在别的国家」「只想投沙特」时,先 `ad campaigns --json-out` 看 `positiveGeoTargetTypeV2`:值是 `PresenceOrInterest` 就是位置选项的问题,改成 `--geo-target-type presence`,不是加排除地区。回读不一致时 `verification=partial`。改完按下文「改过地区以后」重新出 batch diff 报告。
308
+
309
+ `campaign-edit` 的名称、预算、出价、投放网络、位置选项,以及 `campaign-status`,走字段级 PATCH(`writeScope=search-field-patch`)。请求只带本次传入的字段,没传的字段保持原样。金额仍是主币种元,CLI ×100 写入网关「分」。`--search-network` / `--content-network` 传 `true` 或 `false`,关闭传 `false`,不能传空。`budgetShared=true` 时本命令直接拒绝 `--budget`。改共享预算用 `ad shared-budget`,不要改这一条系列的日预算字段。PMax 不要用本命令。
284
310
 
285
311
  **AI Max:** 不要写系列级 `keyword_match_type`(AI Max 开启后 Google 会拒)。改单条关键词匹配类型仍用关键词命令。列表/判断渠道类型用 `channelTypeV2`,不要用旧 `channelType`。
286
312
 
287
- 投放时段用 `ad schedule-replace`,不要自己拼系列 PUT。开始/结束时间、地区类型、地区/语言/否定 IP 的整表替换,以及动态搜索广告域名,CLI 还没有独立参数,不要自己拼 PUT 或 PATCH。
313
+ 投放时段用 `ad schedule-replace`,不要自己拼系列 PUT。开始/结束时间、地区/语言/否定 IP 的整表替换,以及动态搜索广告域名,CLI 还没有独立参数,不要自己拼 PUT 或 PATCH。
288
314
 
289
315
  写完会再 GET:`verification=verified` 才表示对上了本次字段;没改预算但回读预算变了则是 `partial`;读不到是 `unknown`(再查 `ad campaigns`,不要当成没改成,也不要立刻重发)。请求失败时会再 GET 一次预算:金额相对提交前变了是 `partial`(退出码 0),读不到或无法对比是 `unknown`(退出码 0),都不要立刻重发;金额没变才是失败(退出码 1)。
290
316
 
@@ -442,8 +468,17 @@ siluzan-tso ad extension snippet-headers [--json-out ./snap]
442
468
  # 查询
443
469
  siluzan-tso ad extension list -a <accountId> \
444
470
  [--type SITELINK|CALL|CALLOUT|STRUCTURED_SNIPPET|LEAD_FORM|BUSINESS_MESSAGE] \
445
- [--campaign-id <campaignId>] [--json-out ./snap]
471
+ [--campaign-id <campaignId>] [--start YYYY-MM-DD] [--end YYYY-MM-DD] [--json-out ./snap]
446
472
 
473
+ ```
474
+
475
+ `ad extension list` 口径:
476
+
477
+ - **带 `--campaign-id`**:读该系列的系列级 + 组级附加信息,不看日期;暂停、刚建好、没有展示的系列也能读到。输出行带 `adGroup:` 的是组级。
478
+ - **不带 `--campaign-id`**:整户列表,只含 `--start`~`--end`(默认近 30 天)内有展示的条目。
479
+ - stderr 出现「已退回整户列表按系列过滤」时,结果只含区间内有展示的系列级条目。**查不到不代表没建,禁止据此补建**;先问用户或去 Google Ads 后台核对。
480
+
481
+ ```bash
447
482
  # 附加链接
448
483
  siluzan-tso ad extension sitelink -a <accountId> --text "文字" --url "https://..." \
449
484
  [--line2/--line3 <text>] [--level Account|Campaign|AdGroup] [--campaign-id <id>] [--json-out ./snap]
@@ -573,7 +608,16 @@ siluzan-tso ad schedule-replace -a <accountId> --campaign-id <id> --file ./sched
573
608
  ```
574
609
 
575
610
  ```json
576
- [{ "DayOfWeekV2": "Monday", "StartHour": 9, "EndHour": 18, "StartMinuteV2": "Zero", "EndMinuteV2": "Zero", "BidModifier": 20 }]
611
+ [
612
+ {
613
+ "DayOfWeekV2": "Monday",
614
+ "StartHour": 9,
615
+ "EndHour": 18,
616
+ "StartMinuteV2": "Zero",
617
+ "EndMinuteV2": "Zero",
618
+ "BidModifier": 20
619
+ }
620
+ ]
577
621
  ```
578
622
 
579
623
  分钟只接受 `Zero` | `Fifteen` | `Thirty` | `FortyFive`。清空传 `[]`。先把现有时段和文件内容列给用户,确认后再 `--commit`。
@@ -592,16 +636,16 @@ siluzan-tso ad coverage apply -a <accountId> --kind ai-max --config-file ./ai-ma
592
636
  siluzan-tso ad coverage bid-simulation -a <accountId> --campaign-id <id>
593
637
  ```
594
638
 
595
- | kind | 作用 |
596
- | --- | --- |
639
+ | kind | 作用 |
640
+ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
597
641
  | `display` / `shopping` / `video` / `app` / `hotel` / `travel` / `pmax-travel` / `local` / `local-services` / `dsa` | 按官方必填字段建系列,结果暂停。展示、购物、应用、DSA 已有 `ad-gap` 时优先用 `ad-gap`。酒店要 Hotel Center ID。旅游要 Travel account ID。`pmax-travel` 在当前 API 里的子类型是 `TravelActivities` |
598
- | `ai-max` / `tracking` / `portfolio-bidding` / `attach-bidding` | AI Max、跟踪模板、最终到达网址后缀、组合出价策略 |
599
- | `price` / `promotion` / `mobile-app` / `location` / `ad-image` / `lead-form` | 价格、促销、应用、地址、搜索图片、把已有线索表单挂到系列 |
600
- | `radius` / `campaign-ip` / `life-event` / `custom-audience` / `combined-audience` / `brand-list` / `content-label` | 半径定位、系列级 IP 排除、人生事件、挂已有自定义受众、组合受众、品牌排除、系列级品牌安全。新建受众用 `google.custom-audience` |
601
- | `label` / `experiment` / `seasonality` / `customizer` | 已有 `ad-gap` action,用 `ad-gap`。草稿用实验,不要再找旧的 Campaign Draft |
602
- | `conversion-action` / `conversion-value-rule` / `click-conversion` | 已有 `ad-gap` 的 `google.create-conversion-action` / `google.value-rule` / `google.upload-clicks`。邮箱按官方规则先规范化再 SHA-256 |
603
- | `frequency-cap` / `carousel` / `product-ad` / `listing-group` | Demand Gen 频次上限、轮播、商品广告,以及 PMax 商品过滤 |
604
- | `bid-simulation` | 只读出价模拟。已有 `ad-gap` 的 `google.campaign-simulations` |
642
+ | `ai-max` / `tracking` / `portfolio-bidding` / `attach-bidding` | AI Max、跟踪模板、最终到达网址后缀、组合出价策略 |
643
+ | `price` / `promotion` / `mobile-app` / `location` / `ad-image` / `lead-form` | 价格、促销、应用、地址、搜索图片、把已有线索表单挂到系列 |
644
+ | `radius` / `campaign-ip` / `life-event` / `custom-audience` / `combined-audience` / `brand-list` / `content-label` | 半径定位、系列级 IP 排除、人生事件、挂已有自定义受众、组合受众、品牌排除、系列级品牌安全。新建受众用 `google.custom-audience` |
645
+ | `label` / `experiment` / `seasonality` / `customizer` | 已有 `ad-gap` action,用 `ad-gap`。草稿用实验,不要再找旧的 Campaign Draft |
646
+ | `conversion-action` / `conversion-value-rule` / `click-conversion` | 已有 `ad-gap` 的 `google.create-conversion-action` / `google.value-rule` / `google.upload-clicks`。邮箱按官方规则先规范化再 SHA-256 |
647
+ | `frequency-cap` / `carousel` / `product-ad` / `listing-group` | Demand Gen 频次上限、轮播、商品广告,以及 PMax 商品过滤 |
648
+ | `bid-simulation` | 只读出价模拟。已有 `ad-gap` 的 `google.campaign-simulations` |
605
649
 
606
650
  半径用公里时,网关按官方单位换成毫英里。价格素材要 3 到 8 条报价。季节性调整指定系列时不要再写渠道类型。品牌列表这条命令只做排除。
607
651
 
@@ -4,13 +4,13 @@
4
4
 
5
5
  ## 支持的广告类型(硬边界)
6
6
 
7
- | 类型 | CLI / Skill | 说明 |
8
- | --------------------------- | ------------- | ------------------------------------------------------------------------- |
9
- | **搜索广告(Search)** | ✅ 支持 | 方案、`campaign-validate` / `campaign-create`、组/RSA/关键词 CRUD、扩展等 |
10
- | **Performance Max(PMax)** | ✅ 支持 | `pmax-validate` / `pmax-create` 及存量 PMax 管理(见 `pmax-api.md`) |
11
- | **Demand Gen(需求开发)** | ✅ 支持 | `ad demand-gen`(见 `demand-gen-api.md`)。不是 Display,也不是 PMax |
12
- | **展示 / 购物 / 应用 / DSA** | ✅ `ad-gap` | `google.display-campaign`、`google.shopping-campaign`、`google.app-campaign`、`google.dynamic-search-campaign`。不要用 `campaign-create` 伪装 |
13
- | **视频 / 酒店 / 旅游 / 本地 / 本地服务** | ✅ `ad coverage` | 见 `google-ads-write.md`。创建固定暂停 |
7
+ | 类型 | CLI / Skill | 说明 |
8
+ | ---------------------------------------- | ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
9
+ | **搜索广告(Search)** | ✅ 支持 | 方案、`campaign-validate` / `campaign-create`、组/RSA/关键词 CRUD、扩展等 |
10
+ | **Performance Max(PMax)** | ✅ 支持 | `pmax-validate` / `pmax-create` 及存量 PMax 管理(见 `pmax-api.md`) |
11
+ | **Demand Gen(需求开发)** | ✅ 支持 | `ad demand-gen`(见 `demand-gen-api.md`)。不是 Display,也不是 PMax |
12
+ | **展示 / 购物 / 应用 / DSA** | ✅ `ad-gap` | `google.display-campaign`、`google.shopping-campaign`、`google.app-campaign`、`google.dynamic-search-campaign`。不要用 `campaign-create` 伪装 |
13
+ | **视频 / 酒店 / 旅游 / 本地 / 本地服务** | ✅ `ad coverage` | 见 `google-ads-write.md`。创建固定暂停 |
14
14
 
15
15
  用户要展示、购物、应用或 DSA 时走 `ad-gap`。视频、酒店、旅游、本地走 `ad coverage`。禁止用搜索系列 JSON / `ad-create`(RSA)冒充这些类型。
16
16
 
@@ -20,23 +20,23 @@ Meta / Facebook 线索广告走 **`meta-ad`(W13)**,**禁止**用本命令
20
20
 
21
21
  ## 何时 Read
22
22
 
23
- | 任务 | Read |
24
- | ------------------------------------------- | ---------------------------------------------------------------------- |
25
- | 查系列/组/创意/关键词/搜索词/地理 | [`google-ads-read.md`](google-ads-read.md) |
26
- | 封禁 / 拒登申诉稿、整改与证据清单 | [`google-ads-appeal.md`](google-ads-appeal.md)(W14;不代提交) |
27
- | 创建/编辑/启停/否词/附加信息/PMax/设备出价 | [`google-ads-write.md`](google-ads-write.md) |
28
- | batch 流水线、`ad batch`、AI 智投草稿(W4) | [`google-ads-batch.md`](google-ads-batch.md) |
29
- | 搜索系列 7 步方案与门禁 | [`google-ads-campaign-plan.md`](google-ads-campaign-plan.md) |
30
- | PMax 网关路径 | [`pmax-api.md`](pmax-api.md) |
31
- | Demand Gen 创建 / 修改 / 看数 | [`demand-gen-api.md`](demand-gen-api.md) |
23
+ | 任务 | Read |
24
+ | ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
25
+ | 查系列/组/创意/关键词/搜索词/地理 | [`google-ads-read.md`](google-ads-read.md) |
26
+ | 封禁 / 拒登申诉稿、整改与证据清单 | [`google-ads-appeal.md`](google-ads-appeal.md)(W14;不代提交) |
27
+ | 创建/编辑/启停/否词/附加信息/PMax/设备出价 | [`google-ads-write.md`](google-ads-write.md) |
28
+ | batch 流水线、`ad batch`、AI 智投草稿(W4) | [`google-ads-batch.md`](google-ads-batch.md) |
29
+ | 搜索系列 7 步方案与门禁 | [`google-ads-campaign-plan.md`](google-ads-campaign-plan.md) |
30
+ | PMax 网关路径 | [`pmax-api.md`](pmax-api.md) |
31
+ | Demand Gen 创建 / 修改 / 看数 | [`demand-gen-api.md`](demand-gen-api.md) |
32
32
  | 内容排除 / 版位花费 / 账户否词 / 转化口径 / 操作记录 | [`google-ads-exclusions.md`](google-ads-exclusions.md)。改口径见 [`ad-gap.md`](../operations/ad-gap.md) Google 段首 |
33
- | PMax 保护 / 素材表现 / IP | [`google-ads-protection.md`](google-ads-protection.md) |
34
- | 优化/合规 SOP | [`rules/README.md`](rules/README.md)(只读索引 → 再读一个 rules 文件) |
33
+ | PMax 保护 / 素材表现 / IP | [`google-ads-protection.md`](google-ads-protection.md) |
34
+ | 优化/合规 SOP | [`rules/README.md`](rules/README.md)(只读索引 → 再读一个 rules 文件) |
35
35
 
36
36
  ## Gotchas
37
37
 
38
38
  - **广告类型**:Search、PMax、Demand Gen 走 `ad`。展示、购物、应用、DSA 走 `ad-gap`。视频、酒店、旅游、本地、本地服务走 `ad coverage`。不要用 `campaign-create` 伪装。Demand Gen 用 `ad demand-gen`,不要用 `campaign-edit` / `pmax-edit`。内容排除用 `ad exclusions`,那是账户级内容适宜性,不是创建展示广告。内容关键字和库存类型没有公开接口。
39
- - **Search 改字段**:`campaign-status`、`campaign-edit` 的名称/预算/出价/投放网络、`adgroup-status` / `adgroup-rename` / `adgroup-edit`、`keyword-status`、`keyword-edit` 的状态/出价/网址、`ad-status` / `ad-edit` 都是字段级 PATCH,只写本次参数。词面和匹配类型仍是批量 PUT。关闭搜索合作伙伴或展示网络传 `--search-network false` / `--content-network false`。PMax 用 `pmax-edit`,不要用 `campaign-edit`。
39
+ - **Search 改字段**:`campaign-status`、`campaign-edit` 的名称/预算/出价/投放网络/位置选项、`adgroup-status` / `adgroup-rename` / `adgroup-edit`、`keyword-status`、`keyword-edit` 的状态/出价/网址、`ad-status` / `ad-edit` 都是字段级 PATCH,只写本次参数。词面和匹配类型仍是批量 PUT。关闭搜索合作伙伴或展示网络传 `--search-network false` / `--content-network false`。PMax 用 `pmax-edit`,不要用 `campaign-edit`。
40
40
  - **命令名**:系列列表是 `ad campaigns`(别名 `campaign-list`),**禁止** `ad-campaigns` / `campaign list`。`balance`/`stats` 须 `-m Google`。`adgroup-edit` / `keyword-edit` / `ad-edit` 没有 `--json-out`。`ad campaigns|groups|keywords|list` 没有 `--id`。
41
41
  - **列表金额**:`ad campaigns` 的 `budget`、`targetSpendBidCeilingYuan`、`targetCpaAmountYuan` 是元,与 `--budget` / `--bid-ceiling` / `--target-cpa` 同口径。同对象的 `targetSpend_BidCeilingAmount`、`targetCpa_BidingAmount` 仍是分(`1` = 0.01 元),禁止填回写参数。`ad groups` 只读 `maxCPCAmountYuan` / `targetCpaAmountYuan`。`pmax-get` 的 `budget` 仍是分(`500` = 5 元),`pmax-edit --budget` 填元。`demand-gen list/get` 的 `budget` 也是分,看 `budgetYuan`;`demand-gen edit --budget` 和创建 JSON 填元。两套字段同时在时以 `*Yuan` 为准。
42
42
  - **关键词改价回读**:`keyword-edit` 报「列表仍是」时,列表缓存约 60 秒且没有 `--fresh`。不要立刻重跑,不要删词重建。等约 60 秒再看 `maxCPCYuan`。`--max-cpc 0` 是清空并回到广告组出价。广告组 `--target-cpa 0` 同样是清空;`--max-cpc` 必须大于 0。
@@ -48,6 +48,9 @@ Meta / Facebook 线索广告走 **`meta-ad`(W13)**,**禁止**用本命令
48
48
  - **batch get**:读 `agentWorkflow`——无 `campaignId` 的 Failed/HasFailed **禁止**跑 `batch diff`,按 `agentHint` 改 JSON 重提。
49
49
  - **创建失败不删系列、不试系列**:政策违规、名称占用、半成品系列残留时,**禁止**自行建测试系列逐地域排查或 `campaign-delete`;先报告并等用户选(见 [`google-ads-write.md`](google-ads-write.md)「创建失败时禁止的做法」)。删系列须用户同意 + `--i-confirm`。本轮 `ad ad-create` 试出来的残缺 RSA 用 `ad ad-delete` 清掉,不要只暂停。
50
50
  - **失败只改报错项**:`batch get` 带 `--config-file` 时 `agentWorkflow.failedOperations[]` 把 `mutate_operations[N]` 映射到 JSON 路径;只改这些项,**禁止**整类清空否词/排除地域/投放国家后重提(见 [`rules/google-ads-plan-source-fidelity.md`](rules/google-ads-plan-source-fidelity.md)「创建失败后」)。
51
+ - **投放国家与位置选项**:方案没写国家时,必须先问用户投哪些国家,等用户回复后才能创建,不能按语种、网址或系列名推断。位置选项写 `PositiveGeoTargetTypeV2`。没写或写 `Unspecified` 时 CLI 按 `Presence`(仅所在地)提交。网关不读旧字段 `PositiveGeoTargetType`;V2 留空时,Google 会落成「所在地或感兴趣」,目标国家以外的人也会看到广告。`PresenceOrInterest` / `SearchInterest` 只在方案明确要求时写。创建后改用 `ad campaign-edit --geo-target-type presence|presence-or-interest|search-interest`,排除侧用 `--negative-geo-target-type presence|presence-or-interest`。`batch diff` 会比对位置选项,也会报出线上多出的计划外地域。改过地区或位置选项后,要重跑 `batch diff`,把新报告发给用户(`google-ads-write.md`「改过地区以后」)。
52
+ - **附加信息层级**:`campaign-create` 的 `ExtensionsForBatchJob` 只能挂在系列上,`level` 写别的会被 validate 拦下。组级附加信息要在创建完成后用 `ad extension <类型> --level AdGroup --adgroup-id <id>` 单独挂,`batch diff` 不比对组级。
53
+ - **附加信息防重复**:核对某系列挂了哪些附加信息用 `ad extension list --campaign-id`。`batch diff` 按类型和文案比对(站点链接、宣传信息看文字,电话看号码,结构化摘要看标头和值)。附加信息为 `skipped`,或 `extension list` 提示「已退回整户列表」时,查不到不等于没建,**禁止**补建;重复执行 `ad extension sitelink` 会挂上多份同样文案。`batch diff` 的 `extensionDuplicates[]` 非空时,把报告里「重复挂载的附加信息」告诉用户,请用户在 Google Ads 后台删掉多余的,**禁止**自行删除或再补建。
51
54
  - **batch diff 交付**:把 stdout 中 `BEGIN_USER_DELIVERY_MARKDOWN`…`END`(或 `reportMarkdownFile`)**全文以 Markdown 发给用户**(先于补建);**禁止**只说「未发现缺失 / 详情已交付」。
52
55
  - `-a` 必须是 `list-accounts -m Google` 的 `ma.mediaCustomerId`,**禁止**传 `entityId`(UUID)。
53
56
 
@@ -45,6 +45,7 @@
45
45
  | 转换时发现方案自相矛盾 | 同组同词多匹配类型冲突、必填块缺失、否词会屏蔽正向关键词(validate warning 列出被屏蔽词)等 |
46
46
  | 出价/设备口径存疑 | CPC 上限 ≥ 日预算;方案要求排除某设备但 `targetedPlatforms` 未写 `-100` |
47
47
  | 地域无法解析 | `geo resolve` 的 `unserved` / `needs_review` / `not_found` 项 |
48
+ | 方案没写投放国家 | 只有产品/语种/网址,没有国家列表。必须等用户给出国家才能创建,不能自己推断 |
48
49
 
49
50
  **禁止**:未询问就替用户改方案内容(改词面、改标题消重、截断、删词、改匹配类型等)然后直接 create。
50
51
  **禁止**:只丢一句「校验失败」就停住,不给选项。
@@ -60,6 +61,8 @@
60
61
 
61
62
  **例外(仍可静默做,不算「改方案」,也不进修改报告主表)**:`ad geo resolve` 取地域 id、剥 `_` 注解键、提交前金额元→分——这些是契约/网关要求,不是改用户业务内容。
62
63
 
64
+ **创建后改地区**:用户要求换国家、加减国家或改位置选项,改完后先同步计划 JSON,再重跑 `ad batch diff`,把新的报告全文发给用户(见 `google-ads-write.md`「改过地区以后」)。之前发过的报告已过时,不能用旧报告或一句「已改好」代替。
65
+
63
66
  **与「创建后自动补建」的区别**:用户已确认过 JSON 并 `campaign-create` 之后,BatchJob 漏掉的 Sitelink/地域用 `batch diff` **自动补建**(见 `google-ads-campaign-plan.md`);那是执行层补洞,不是改用户方案。不合规询问发生在 **create 之前**。补建条数可写在报告「创建结果」里,但**不要**混进「相对原方案的修改」表。
64
67
 
65
68
  ---
@@ -127,6 +130,8 @@
127
130
 
128
131
  1. **匹配类型**:方案里有「完全/词组/广泛」列或 `[词]` / `"词"` / 裸词时,写入对应 `MatchTypeV2` 块(EXACT / PHRASE / BROAD),**不要**图省事压成一律 BROAD。
129
132
  2. **地域 id**:只来自 `ad geo resolve`(或多国一次 resolve;单国也可用 `ad geo search`)。`locations` 与 `targetedLocations` 同序同量。
133
+ - **方案里没写投放国家/地区时,必须先问用户投哪些国家,等用户明确回复后才能 `campaign-create`。** 不能从产品、语种、网站域名、文件名或系列名(如名字里带 `SA`、`_AR_`)推断国家,也不能先按猜的国家建出来再让用户改。阿拉伯语不等于沙特,英语不等于美国。用户回复的国家写进 JSON 后,在步 4 的确认摘要里再列一遍「国家 ↔ id」。
134
+ - **位置选项**:写 `PositiveGeoTargetTypeV2` / `NegativeGeoTargetTypeV2`。方案没提就写 `Presence`(仅所在地;不写 CLI 也会按 Presence 提交)。方案明确说「也覆盖关注/搜索该地区的人」才写 `PresenceOrInterest` / `SearchInterest`。旧字段 `PositiveGeoTargetType: 0` 网关不读,不要再写。
130
135
  3. **结构**:先 Read `assets/campaign-create-template.json`,脚本输出同构;RSA 15 标题 + 4 描述;否词只进 `NegativeKeywordsForBatchJob`。
131
136
  4. **落盘**:用脚本 `--out` / `writeFile`,**禁止**在对话里手写完整 campaign JSON。
132
137
 
@@ -6,7 +6,7 @@
6
6
  siluzan-tso config show # 取 webUrl
7
7
  ```
8
8
 
9
- 首页地址:`https://www.siluzan.com/v3/foreign_trade/tso/home`
9
+ 首页地址:`https://www-ci.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.siluzan.com/v3/foreign_trade/tso/home`。
28
+ 1. **「和首页一样的总览」** → 打开 `https://www-ci.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
 
@@ -30,6 +30,7 @@
30
30
  | `google-quarterly-plan.md` | **P10 下期规划规则**:九章 + Q01–Q30;写 `narrative.plan` 前必读 |
31
31
  | `google-period-report-excel.md` | **仅用户要 Excel 时**(P4 定制 Sheet):先 `*.outline.txt` 后脚本写 xlsx;账户须 `-k` 核验,无 CLI excel 子命令 |
32
32
  | `stats-daily-excel.md` | **P4-DAILY**:账户级按日 Excel(`stats --by-day`) |
33
+ | `google-daily-report-excel.md` | **P4-DAILY**(Google):投放日报 5 Sheet xlsx(`google-analysis --by-date` + `daily-render`) |
33
34
  | `google-account-diagnosis-report.md` | Google 账户深度诊断(健康度/转化/结构等) |
34
35
  | `google-ads-diagnosis.md` | Google **广告诊断**完整纲要(HTML 区块、**每日趋势 2 位小数**、**每模块必填分析/建议**) |
35
36
  | `meta-period-report.md` / `.html` | **Meta(Facebook)周期报告(默认)**:四步流程 → `facebook-analysis render` 出 HTML,见 P4-FB |
@@ -17,7 +17,7 @@ siluzan-tso google-ads-diagnosis render \
17
17
 
18
18
  ### 撰写要点(摘要)
19
19
 
20
- 1. **每日趋势**(§7 / `daily-metrics`):金额、CPA **保留 2 位小数**;展示/点击/转化用整数;图表 tooltip 同规则。
20
+ 1. **每日趋势**(§7 / `daily-metrics`):金额、CPA、转化价值 **保留 2 位小数**;展示/点击/转化用整数;图表 tooltip 同规则。转化价值读 `conversionsValue`。
21
21
  2. **每一章**除表格外须有 **分析**(≥2 条)+ **建议**(≥1 条);禁止只罗列数据。
22
22
 
23
23
  ---
@@ -104,7 +104,7 @@ siluzan-tso google-ads-diagnosis render \
104
104
  | 金额类(消耗、CPA、CPC、预算等) | **保留 2 位小数**,带货币 | `¥1,234.56 CNY` |
105
105
  | 展示、点击、转化次数 | **整数**,不写长小数 | `1,280` 而非 `1280.000000` |
106
106
  | 比率(CTR、CVR、环比%) | JSON 为 0~1 小数时,展示 `(v×100).toFixed(2)+'%'` | `0.0523` → `5.23%` |
107
- | **每日趋势 / 转化成本曲线** | 数据源:`daily-metrics` 或 `conversionCost.items`(`date`、`cost`、`cpa`、`conversions` 等) | 见下 |
107
+ | **每日趋势 / 转化成本曲线** | 数据源:`daily-metrics` 或 `conversionCost.items`(`date`、`cost`、`cpa`、`conversions`、`conversionsValue`) | 见下 |
108
108
 
109
109
  **每日趋势表与图(§3.5 转化成本 / 按日趋势)**:
110
110
 
@@ -314,7 +314,7 @@ siluzan-tso google-ads-diagnosis render \
314
314
 
315
315
  #### 转化成本 / 按日趋势(若页面已渲染)
316
316
 
317
- - **数据**:`conversionCost.items` 或 `daily-metrics` 落盘数组(含 `date`、`cost`、`cpa`、`conversions`、`clicks` 等)。
317
+ - **数据**:`conversionCost.items` 或 `daily-metrics` 落盘数组(含 `date`、`cost`、`cpa`、`conversions`、`conversionsValue`、`clicks`)。`conversionsValue` 是账户币种转化价值,单独一列,不要用转化次数代替。
318
318
  - **表格**:日期 | 消耗(2 位小数)| 转化(整数)| CPA(2 位小数)— 见上文「每日趋势」格式。
319
319
  - **图表**:折线/双轴图;tooltip 金额 **2 位小数**。
320
320
  - **分析(必填)**:至少 2 条,例如「周内 CPA 波动区间」「转化高峰日 vs 消耗高峰日是否一致」。
@@ -0,0 +1,45 @@
1
+ # Google 投放日报 Excel(google-analysis --by-date + daily-render)
2
+
3
+ > 流程见 `playbooks.md` **P4-DAILY**(Google 分支)。用户上传过一份旧日报、说「按这个格式重新拉到昨天」也走本页。
4
+
5
+ 一共两条命令,第二条不到 1 秒:
6
+
7
+ ```bash
8
+ siluzan-tso google-analysis -a <mediaCustomerId> --start <S> --end <E> \
9
+ --sections overview,campaigns,keywords,search-terms --by-date --json-out ./snap-daily
10
+ siluzan-tso google-analysis daily-render --snapshot-dir ./snap-daily \
11
+ --title "<客户名> · 投放日报" [--note "<优化动作原文>"] --out ./<文件名>.xlsx
12
+ ```
13
+
14
+ - `<E>`:「截止昨日」= 东八区昨天。`<S>`:沿用旧日报的起始日;用户没给就问,不要猜。
15
+ - `--by-date` 一次返回整段「每天 × 系列 / 关键词 / 搜索词」。网关还不支持按日时,CLI 自己逐日拉取(stderr 有一行 `已改为逐日拉取 N 天`),这是正常情况,不用处理。区间超过 92 天会报错,按月拆段分别拉。
16
+ - `daily-render` 的 stdout 是一行 JSON:`file`、`totals`(点击 / 展示 / 费用 / 转化)、`daysWithData`、`latestDay`、`daysWithoutData`、各 Sheet 行数。对用户的汇总直接用这些数,**不要**再打开 xlsx 核对。
17
+ - `latestDay` 早于 `<E>`:那天账户没有展示,照实说,不要重拉。`daysWithoutData` 是账户没有投放的日子(暂停、预算用完),不是拉数失败。
18
+
19
+ ## 产物:5 个 Sheet
20
+
21
+ | Sheet | 内容 |
22
+ | ----- | ---- |
23
+ | 账户概览 | 本期按系列类型汇总(含合计);每日 × 系列类型 |
24
+ | 每日数据 | 账户每日;每日 × 广告系列 |
25
+ | 分计划数据 | 本期按广告系列汇总(含合计、类型、状态);每日 × 广告系列 |
26
+ | 搜索字词报告 | 每日 × 搜索字词(匹配类型、关键字、已添加/已排除、系列、广告组);有 `--note` 时表头上方写「优化动作」 |
27
+ | 关键词 | 每日 × 关键词(系列、广告组、匹配类型) |
28
+
29
+ 指标列:点击次数、展示次数、点击率、货币代码、平均每次点击费用、费用、转化次数、每次转化费用、转化率。系列和类型表另有「绝对页首展示份额」「页首展示份额」。
30
+
31
+ - 所有合计都由按日行加总,各 Sheet 的合计互相对得上。账户每日也由系列按日加总,**不要**另拉 `daily-metrics` 去对(它每天同步一次,昨天可能还没进)。
32
+ - 份额只对搜索系列有值,其他类型写「—」。多天合并按「展示 ÷ 搜索展示份额」加权。Google 把低于 10% 的份额返回成 `0.0999`。
33
+ - 搜索词和关键词只含有消耗的行。效果最大化的搜索词没有按日数据,不在本表。
34
+
35
+ ## 旧日报模板怎么用
36
+
37
+ 只从旧文件里取四样:账户 ID、起始日、标题、「优化动作」原文(放进 `--note`)。版式由 `daily-render` 决定,**禁止**用 openpyxl / pandas 读旧文件的样式、合并单元格、列宽再复刻,也**禁止**把新数据写回旧文件。
38
+
39
+ 旧日报的「绝对页首展示次数百分比 / 页首展示次数百分比」是 Google 前台的 Impr. (Abs. Top) % 和 Impr. (Top) %(占自己展示的比例)。CLI 拿不到这两项,本表写的是展示**份额**(占可获得展示的比例),数值会比旧表低。交付时说一句列名变了、口径不同,不要把份额填进旧列名。
40
+
41
+ ## 禁止
42
+
43
+ - 按天循环 `google-analysis`(`for d in …`、`&` 后台并发、Python `subprocess` 包 `siluzan-tso`)。沙箱会拦截后台并发,subprocess 里可能拿不到凭据。
44
+ - 拉完再单独拉 `campaigns` 不带 `--by-date` 去做「区间合计」:合计已经在表里。
45
+ - 渲染成功后再开 xlsx 逐格检查、改样式重跑。用户提出修改再改。
@@ -120,7 +120,7 @@ function valueKpis(items) {
120
120
 
121
121
  禁止对行上的 `conversionsValuePerCost` 再平均(那是行级「转化价值/费用」,不是账户 ROAS)。
122
122
 
123
- 关键词、搜索字词、国家/地区、设备、受众、每日趋势的转化价值读各自行的 `conversionsValue`(账户币种),ROAS = 该值 / 该行 `spend`。禁止把系列汇总摊到词、国家或设备上,也禁止用转化次数估算。行上有这个数字就按返回值填写,0 也写 0,不要改成「未返回」。只有行上没有该字段时才写「未返回」。`campaign-hour`、视频和图片素材的查询没有这项,这些维度才写「未返回」。上期 `campaigns` 拉数失败时,账户级三格写明原因,不要留空。
123
+ 关键词、搜索字词、国家/地区、设备、受众、每日趋势都要有「转化价值」列,读各自行的 `conversionsValue`(账户币种)。每日趋势读 `daily-metrics` 的 `items[].conversionsValue`;设备读 `devices` 或 `campaign-device`;地域读 `geographic` / `geo-targeted`。ROAS = 该值 / 该行 `spend`(spend 为 0 写「—」)。禁止把系列汇总摊到词、设备、国家或按日上,也禁止用转化次数估算。行上有这个数字就按返回值填写,0 也写 0,不要改成「未返回」。只有行上没有该字段时才写「未返回」。`geo-matched` / `campaign-geo`、`campaign-hour`、视频和图片素材没有这项查询,写「该维度未返回」。上期 `campaigns` 拉数失败时,账户级三格写明原因,不要留空。
124
124
 
125
125
  英文终稿表头:转化价值 → Conversion value,单转化价值 → Value / conversion,ROAS 保持 ROAS。
126
126
 
@@ -37,7 +37,7 @@ siluzan-tso google-analysis render \
37
37
 
38
38
  - `meta`:`accountId`(必填)/ `accountName` / `currency` / `startDate` / `endDate`;可省略由 `--snapshot-dir` 从 `overview` + manifest 自动合并。
39
39
  - `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`(上期无活跃天数,不编造)。
40
- - `charts.dailyTrend`:每日趋势(`dates`/`cost`/`conversions`/`cpa`);可省略由 `daily-metrics` 自动合并。
40
+ - `charts.dailyTrend`:每日趋势(`dates`/`cost`/`conversions`/`conversionsValue`/`cpa`);可省略由 `daily-metrics` 自动合并。`conversionsValue` 是账户币种转化价值。
41
41
  - `tables.{dimensionSummary,campaigns,devices,geographic,audience,keywords,negativeKeywords}`:对应 §3~§9 表格数据;可省略由同名 `google-analysis` section 自动合并。`negativeKeywords` 合并后必须是数组,**0 条也是 `[]`**。
42
42
  - `narrative`(**Agent 必填,唯一由 Agent 撰写的内容**):
43
43
  - `executiveSummary[]`:≥1 段执行摘要
@@ -67,10 +67,10 @@ siluzan-tso google-analysis render \
67
67
  | # | 维度 | CLI |
68
68
  | --- | ---------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
69
69
  | 1 | 执行摘要(消耗/展示/点击/转化/CTR/CPC/CPA 本期概览) | `google-analysis --sections overview` |
70
- | 2 | 每日投放趋势(按日消耗/点击/转化曲线;金额/CPA **2 位小数**,转化/点击整数) | `google-analysis --sections daily-metrics` |
70
+ | 2 | 每日投放趋势(按日消耗/转化/转化价值/CPA;金额与转化价值 **2 位小数**,转化整数) | `google-analysis --sections daily-metrics`(`items[].conversionsValue`) |
71
71
  | 3 | 月度汇总(全周期汇总数据) | `google-analysis --sections dimension-summary` |
72
72
  | 4 | 广告系列表现(预算/出价策略/各系列消耗与效果) | `google-analysis --sections campaigns` |
73
- | 5 | 设备分布(PC/移动/平板 消耗/点击/转化) | `google-analysis --sections devices` |
73
+ | 5 | 设备分布(PC/移动/平板 消耗/点击/转化/转化价值) | `google-analysis --sections devices`(行上 `conversionsValue`) |
74
74
  | 6 | 地域分布(国家/地区消耗、转化价值、ROAS) | `google-analysis --sections geographic` |
75
75
  | 7 | 受众分布(意向/兴趣/再营销/客户匹配等列表表现) | `google-analysis --sections audience`(默认不传 `--audience-type`,系统+自定义一起拉) |
76
76
  | 8 | 关键词表现(词/消耗/CTR/CPC 排行),并带上效果最大化搜索词的消耗 | `keywords` 不能合并去重。同一次命令必须还有 `campaigns` 和 `search-terms`,CLI 才写 `pmax-search-terms-*.json`。这一章和任何搜索词表都要并进它的 `items[]`(有 `spend`,`matchTypeZh` 为「效果最大化」)。不要用 `ad pmax-search-terms`,那条没有花费 |
@@ -222,8 +222,8 @@ function deviceKind(deviceType) {
222
222
  | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
223
223
  | R1 | `设备报告` |
224
224
  | R2 | 统计区间 |
225
- | R3(A→M,13 列) | `设备` \| `级别` \| `广告系列` \| `出价调整` \| `展示次数` \| `点击次数` \| `点击率` \| `平均每次点击费用` \| `费用` \| `所有转化次数` \| `转化次数` \| `每次转化费用` \| `转化率` |
226
- | R4… | `campaign-device-*.json`(`items[]`):`deviceType`→设备;`campaignName` / `adGroupName`→「广告系列」等;`allConversions`→「所有转化次数」;`conversions`→「转化次数」;`ctr` / `conversionRate` 直接写入;**出价调整**:写 `bidModifierDisplay`(与 Google 后台一致:未设置=`—`,`0.6`=`-40%`)。禁止把倍率当正百分比,禁止把未设置的 `0` 写成 `-100%`;**级别**列按运营约定(如填 `广告系列` 或 `账户`,全文一致) |
225
+ | R3(A→N,14 列) | `设备` \| `级别` \| `广告系列` \| `出价调整` \| `展示次数` \| `点击次数` \| `点击率` \| `平均每次点击费用` \| `费用` \| `所有转化次数` \| `转化次数` \| `转化价值` \| `每次转化费用` \| `转化率` |
226
+ | R4… | `campaign-device-*.json`(`items[]`):`deviceType`→设备;`campaignName` / `adGroupName`→「广告系列」等;`allConversions`→「所有转化次数」;`conversions`→「转化次数」;`conversionsValue`→「转化价值」(账户币种金额,不是次数);`ctr` / `conversionRate` 直接写入;**出价调整**:写 `bidModifierDisplay`(与 Google 后台一致:未设置=`—`,`0.6`=`-40%`)。禁止把倍率当正百分比,禁止把未设置的 `0` 写成 `-100%`;**级别**列按运营约定(如填 `广告系列` 或 `账户`,全文一致) |
227
227
  | 表末「分析」 | **总结**:各设备消耗与转化占比、系列×设备高消耗组合、移动端 vs 桌面 CPA/CPC 差异。占比按 `deviceKind` 累加费用(见上文),`deviceType` 是 `Desktop`/`Mobile`,不是 `DESKTOP`/`MOBILE`。桌面费用 ≥ 移动时禁止写「移动端为主要消耗 / 移动端占比高」。**建议**:设备出价系数、落地页或系列倾斜(须引用设备类型与表中费用/转化),1~3 条;`okki-render` 不改写建议原文 |
228
228
 
229
229
  ---
@@ -234,8 +234,8 @@ function deviceKind(deviceType) {
234
234
  | ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
235
235
  | R1 | `地理位置报告` |
236
236
  | R2 | 统计区间 |
237
- | R3(A→M,13 列) | `地理位置` \| `广告系列` \| `展示次数` \| `互动次数` \| `互动率` \| `费用` \| `平均费用` \| `点击次数` \| `点击率` \| `所有转化次数` \| `转化次数` \| `每次转化费用` \| `转化率` |
238
- | R4… | `geo-targeted-*.json` 的 `items[]`(`schemaVersion 3` 行统一在 `items`):`countryOrRegion`→地理位置;`campaignName`→「广告系列」;`allConversions`→「所有转化次数」;`conversions`→「转化次数」;**互动次数**→`interactions`,缺省/为 0 时回退 `clicks`(当前定位接口常不回 interactions);**互动率**→`interactionRate`(字符串须解析)或 `互动次数/impressions`,回退后仍为 0 才填 `—`;**平均费用** = `spend / 互动次数`(同样先 interactions 再 clicks),分母为 0 时填 `—`;`ctr` / `conversionRate` 直接写入;其余列按 outline 映射 |
237
+ | R3(A→N,14 列) | `地理位置` \| `广告系列` \| `展示次数` \| `互动次数` \| `互动率` \| `费用` \| `平均费用` \| `点击次数` \| `点击率` \| `所有转化次数` \| `转化次数` \| `转化价值` \| `每次转化费用` \| `转化率` |
238
+ | R4… | `geo-targeted-*.json` 的 `items[]`(`schemaVersion 3` 行统一在 `items`):`countryOrRegion`→地理位置;`campaignName`→「广告系列」;`allConversions`→「所有转化次数」;`conversions`→「转化次数」;`conversionsValue`→「转化价值」(账户币种金额,不是次数);**互动次数**→`interactions`,缺省/为 0 时回退 `clicks`(当前定位接口常不回 interactions);**互动率**→`interactionRate`(字符串须解析)或 `互动次数/impressions`,回退后仍为 0 才填 `—`;**平均费用** = `spend / 互动次数`(同样先 interactions 再 clicks),分母为 0 时填 `—`;`ctr` / `conversionRate` 直接写入;其余列按 outline 映射 |
239
239
  | 表末「分析」 | **总结**:Top 国家/地区消耗与转化、高消耗低转化地域、系列×地域组合。**建议**:地域加价/降价、排除或单独系列(须写国家/地区名 + 表中费用/转化/CPA),1~3 条 |
240
240
 
241
241
  ---
@@ -30,6 +30,7 @@
30
30
  | `google-quarterly-plan.md` | **P10 下期规划规则**:九章 + Q01–Q30;写 `narrative.plan` 前必读 |
31
31
  | `google-period-report-excel.md` | **仅用户要 Excel 时**(P4 定制 Sheet):先 `*.outline.txt` 后脚本写 xlsx;账户须 `-k` 核验,无 CLI excel 子命令 |
32
32
  | `stats-daily-excel.md` | **P4-DAILY**:账户级按日 Excel(`stats --by-day`) |
33
+ | `google-daily-report-excel.md` | **P4-DAILY**(Google):投放日报 5 Sheet xlsx(`google-analysis --by-date` + `daily-render`) |
33
34
  | `google-account-diagnosis-report.md` | Google 账户深度诊断(健康度/转化/结构等) |
34
35
  | `google-ads-diagnosis.md` | Google **广告诊断**完整纲要(HTML 区块、**每日趋势 2 位小数**、**每模块必填分析/建议**) |
35
36
  | `meta-period-report.md` / `.html` | **Meta(Facebook)周期报告(默认)**:四步流程 → `facebook-analysis render` 出 HTML,见 P4-FB |
@@ -17,7 +17,7 @@ siluzan-tso google-ads-diagnosis render \
17
17
 
18
18
  ### 撰写要点(摘要)
19
19
 
20
- 1. **每日趋势**(§7 / `daily-metrics`):金额、CPA **保留 2 位小数**;展示/点击/转化用整数;图表 tooltip 同规则。
20
+ 1. **每日趋势**(§7 / `daily-metrics`):金额、CPA、转化价值 **保留 2 位小数**;展示/点击/转化用整数;图表 tooltip 同规则。转化价值读 `conversionsValue`。
21
21
  2. **每一章**除表格外须有 **分析**(≥2 条)+ **建议**(≥1 条);禁止只罗列数据。
22
22
 
23
23
  ---
@@ -104,7 +104,7 @@ siluzan-tso google-ads-diagnosis render \
104
104
  | 金额类(消耗、CPA、CPC、预算等) | **保留 2 位小数**,带货币 | `¥1,234.56 CNY` |
105
105
  | 展示、点击、转化次数 | **整数**,不写长小数 | `1,280` 而非 `1280.000000` |
106
106
  | 比率(CTR、CVR、环比%) | JSON 为 0~1 小数时,展示 `(v×100).toFixed(2)+'%'` | `0.0523` → `5.23%` |
107
- | **每日趋势 / 转化成本曲线** | 数据源:`daily-metrics` 或 `conversionCost.items`(`date`、`cost`、`cpa`、`conversions` 等) | 见下 |
107
+ | **每日趋势 / 转化成本曲线** | 数据源:`daily-metrics` 或 `conversionCost.items`(`date`、`cost`、`cpa`、`conversions`、`conversionsValue`) | 见下 |
108
108
 
109
109
  **每日趋势表与图(§3.5 转化成本 / 按日趋势)**:
110
110
 
@@ -314,7 +314,7 @@ siluzan-tso google-ads-diagnosis render \
314
314
 
315
315
  #### 转化成本 / 按日趋势(若页面已渲染)
316
316
 
317
- - **数据**:`conversionCost.items` 或 `daily-metrics` 落盘数组(含 `date`、`cost`、`cpa`、`conversions`、`clicks` 等)。
317
+ - **数据**:`conversionCost.items` 或 `daily-metrics` 落盘数组(含 `date`、`cost`、`cpa`、`conversions`、`conversionsValue`、`clicks`)。`conversionsValue` 是账户币种转化价值,单独一列,不要用转化次数代替。
318
318
  - **表格**:日期 | 消耗(2 位小数)| 转化(整数)| CPA(2 位小数)— 见上文「每日趋势」格式。
319
319
  - **图表**:折线/双轴图;tooltip 金额 **2 位小数**。
320
320
  - **分析(必填)**:至少 2 条,例如「周内 CPA 波动区间」「转化高峰日 vs 消耗高峰日是否一致」。