Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions types/google-publisher-tag/google-publisher-tag-tests.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Tests for Google Publisher Tag 1.20240701
// Synced from: https://github.com/googleads/google-publisher-tag-types/commit/b912994ba21b4a754ba6a6289e859fc2b1a907af
// Tests for Google Publisher Tag 1.20240729
// Synced from: https://github.com/googleads/google-publisher-tag-types/commit/1b9687184a46e7cf847a897b13539b78c3393305

// Test for googletag.cmd
function test_googletag_cmd() {
Expand Down Expand Up @@ -646,6 +646,18 @@ function test_googletag_config_adExpansionConfig() {
});
}

// Test for googletag.config.PageSettingsConfig.adYield
function test_googletag_config_pageSettingsConfig_adYield() {
// Disable yielding.
googletag.setConfig({ adYield: "DISABLED" });

// Enable yielding for all slots.
googletag.setConfig({ adYield: "ENABLED_ALL_SLOTS" });

// Enable yielding only for slots outside of the viewport (default).
googletag.setConfig({ adYield: null });
}

// Test for googletag.config.PrivacyTreatmentsConfig.treatments
function test_googletag_config_privacyTreatmentsConfig_treatments() {
// Disable personalization across the entire page.
Expand Down
28 changes: 28 additions & 0 deletions types/google-publisher-tag/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1802,6 +1802,34 @@ declare namespace googletag {
* Settings to control publisher provided signals (PPS).
*/
pps?: PublisherProvidedSignalsConfig | null;

/**
* Setting to control whether GPT should yield the JS thread when
* rendering creatives.
*
* GPT will yield only for browsers that support the Scheduler.postTask
* API.
*
* Supported values:
* - `null` (default): GPT will yield the JS thread for slots outside of
* the viewport.
* - `ENABLED_ALL_SLOTS`: GPT will yield the JS thread for all slots
* regardless of whether the slot is within the viewport.
* - `DISABLED`: GPT will not yield the JS thread.
*
* @example
* // Disable yielding.
* googletag.setConfig({adYield: 'DISABLED'});
*
* // Enable yielding for all slots.
* googletag.setConfig({adYield: 'ENABLED_ALL_SLOTS'});
*
* // Enable yielding only for slots outside of the viewport (default).
* googletag.setConfig({adYield: null});
*
* @see [Scheduler: postTask() method](https://developer.mozilla.org/docs/Web/API/Scheduler/postTask)
*/
adYield?: "DISABLED" | "ENABLED_ALL_SLOTS" | null;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion types/google-publisher-tag/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@types/google-publisher-tag",
"version": "1.20240701.9999",
"version": "1.20240729.9999",
"nonNpm": true,
"nonNpmDescription": "Google Publisher Tag",
"projects": [
Expand Down