[NEEDS LIVE RESOURCE] 下列測試需要外部資源,目前顯示「pending (needs live)」狀態:
- H1 — AdX fill:需可被 AdX/Teads 識別的測試域名(localhost 通常無 AdX fill;RF 使用 news.agentm.tw)。 目前 PoC 已建立完整 GPT 請求鏈路,只差 live 域名即可驗證。
-
Teads bid:需 Teads 測試用
placementId和pageId。 可透過 URL 傳入:?teads_pid=<id>&teads_pageid=<id>
假設驗證狀態 (P0 Gate)
Gate: EvaluatingViewport 測試
可重跑H2/H3 本地驗證 Harness(不需 live 資源)
本地可驗證的假設(參考 HB-054 harness 方法論)
H2: GAM request 從 nested iframe 發出
當 ad-tag.html 載入後,googletag.pubads().refresh([gamSlot]) 在 iframe 內呼叫。 透過 postMessage 收到 GAM_REQUEST_SENT event 即確認。 進一步確認:DevTools Network tab 中查看 /gampad/ads 請求, 確認 iu= 參數包含 /23315141024/...
H3: pbjs.renderAd window.parent loop(friendly iframe)
GAM HB creative 在 friendly iframe 內透過 window.parent loop 找到 pbjs。 此 harness 驗證:publisher page 能存取 adTag iframe 的 pbjs 物件 (因為 ad-tag.html 與此測試頁同 origin,所以 same-origin 存取成立)。 真實情境中,HB creative 的 friendly iframe 與 ad-tag.html 也是 same-origin, 所以 window.parent 爬到 ad-tag.html 視窗即可取得 pbjs。
Pre-verified by gam-creative-render-harness.html Test 4 (HB-054). 此 harness 於 live AdTag iframe 載入後自動確認。
Passback: no-fill 時正確通知 parent
當我方 GAM 連續 3 次 no-fill(slotRenderEnded isEmpty=true), AdTag 透過 postMessage 發送 ADTAG_PASSBACK 通知 parent page。 Publisher page 收到後應執行自己的 waterfall 續跑(passback creative)。
GPT Client-Side Token 跨 iframe 行為觀察
H5 AC: GPT client-side token 跨 iframe 行為(TA-001 §2.3 研究結論)
設計預期(推論,待 live 確認):
我方 AdTag 在 publisher GAM creative iframe 內載入自己的 gpt.js。
這個 gpt.js 實例與 publisher 頁面的 gpt.js 是獨立實例,
各自擁有獨立的 pubads() service 和 client-side token。
影響: 我方 AdX 的 companion ad targeting、frequency capping 在我方 token 範圍內運作, 不與 publisher AdX 混用(這是設計特性,不是 bug)。
PoC 驗證方式:
在 DevTools Console 中,分別在 publisher page frame 和 adtag iframe 的 context 下執行:
googletag.pubads().getTargeting('refresh_site_id')
— 兩者應回傳不同的 targeting 狀態(publisher page 無此 KV;adtag iframe 有)。
測試矩陣
0/0 passed| 假設 | Viewport | 測試方式 | 狀態 | Evidence / Notes |
|---|---|---|---|---|
| H1 — AdX fill | Desktop + Mobile | GPT request → GAM report impression row | [NEEDS LIVE DOMAIN] | localhost 通常無 AdX fill。GPT request path 就緒,需 live 域名部署後驗證。 |
| H2 — GAM request in iframe | Desktop + Mobile | postMessage GAM_REQUEST_SENT event + DevTools Network | PENDING | 等待 AdTag 載入... |
| H3 — pbjs window.parent loop | Desktop + Mobile | 同 origin iframe 存取 pbjs + gam-creative-render-harness pre-verify | PENDING | 等待 AdTag 載入... |
| Teads bid rate (H4) | Desktop | Prebid bid response QPS + win rate | [NEEDS LIVE: teads_pid + teads_pageid] | Pass ?teads_pid=<id>&teads_pageid=<id> to enable. Teads contextual signals in nested iframe may be reduced (pageTitle/desc empty). |
| Passback (H8) | Desktop + Mobile | postMessage ADTAG_PASSBACK event on no-fill | PENDING | Triggered after 3 consecutive no-fill slotRenderEnded events. |
| KV attribution (H9) | Both | GAM report Key-values dimension: refresh_site_id, refresh_pairing_id | [NEEDS LIVE DOMAIN] | KV set in ad-tag.html: site_id=poc-test-ltn, pairing_id=poc-{viewport}-slot-0. Visible in GAM report after live impression. |
| Refresh declaration (H7) | N/A | GAM UI > Inventory > Inventory rules > Publisher declarations | [NEEDS GAM UI CHECK] | Confirm Time interval declaration exists for /23315141024/... with 30s minimum. Required before AdRefresh (Epic 4). |
| GPT token isolation (H5 AC) | Desktop | DevTools frame selector → pubads() check | PENDING | Verify adTag iframe pubads().getTargeting() returns our KV; publisher page frame returns empty. |