Skip to content

Detect GPT initial load configured through setConfig #946

Description

@ChristianPavilonis

Problem

Publishers can disable GPT initial loading with the modern googletag.setConfig({ disableInitialLoad: true }) API. Trusted Server currently detects only the legacy googletag.pubads().disableInitialLoad() method.

When the modern API is used, window.tsjs.gptInitialLoadDisabled remains unset. A TS-owned slot is registered with display(), but it is omitted from the follow-up refresh(), so GPT never emits the GAM request and reports a fetch count of zero.

Acceptance criteria

  • Detect initial-load disabling through both GPT configuration APIs.
  • Refresh a TS-owned slot after display() when initial loading is disabled.
  • Avoid adding a second request when initial loading remains enabled.
  • Cover the modern setConfig() path with regression tests.

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions