TA-002: Nested AdTag PoC — Nested GAM Arbitration

驗證核心假設 H1/H2/H3 | GAM network: 23315141024 | Ad unit: /23315141024/ca-pub-9493942651410878-tag

[NEEDS LIVE RESOURCE] 下列測試需要外部資源,目前顯示「pending (needs live)」狀態:

假設驗證狀態 (P0 Gate)

Gate: Evaluating
[H1] 我方 AdX Fill in nested iframe [NEEDS LIVE]
我方 AdX 在 publisher GAM creative iframe 內能否有實際 fill。 PoC 已建立完整 GPT 請求路徑;需 live 域名才能確認 AdX buyer 回應。
需要:可被 AdX 識別的測試域名(非 localhost) + GAM report 確認 impression row。 現況:GPT request 路徑就緒,ad unit path /23315141024/ca-pub-9493942651410878-tag 使用。
[H2] pubads().refresh() 在 iframe 內觸發我方 GAM request PENDING
googletag.pubads().refresh([gamSlot]) 在巢狀 iframe 內發出正確的 GAM ad request。 預期: DevTools Network 看到 securepubads.g.doubleclick.net/gampad/ads?iu=/23315141024/...
GAM_REQUEST_SENT event received from AdTag iframe. pubads().refresh([gamSlot]) called successfully.
[H3] pbjs.renderAd window.parent loop 找到我方 pbjs PENDING
GAM HB creative 在 friendly iframe 內透過 window.parent loop 找到我方 AdTag 的 pbjs 實例, 呼叫 pbjs.renderAd(document, hb_adid)。
window.parent loop traversal confirmed for same-origin friendly iframe. pbjs found in adTag iframe window.

Viewport 測試

可重跑

Desktop (300×250) PENDING

Ad unit: /23315141024/ca-pub-9493942651410878-tag [300x250]

Mobile (320×50) PENDING

Ad unit: /23315141024/ca-pub-9493942651410878-tag [320x50]

H2/H3 本地驗證 Harness(不需 live 資源)

本地可驗證的假設(參考 HB-054 harness 方法論)

PENDING

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/...

PENDING

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 載入後自動確認。

PENDING

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 有)。

等待 AdTag 載入...

測試矩陣

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.

Event Log