From c85d8ddd59c413bc895261fa3a1e81cd6fba4024 Mon Sep 17 00:00:00 2001 From: Google Publisher Tag Bot Date: Fri, 13 Mar 2026 21:48:48 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#74684=20Sync=20lat?= =?UTF-8?q?est=20changes=20to=20@types/google-publisher-tag=20by=20@google?= =?UTF-8?q?-publisher-tag?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: jimper --- .../google-publisher-tag-tests.ts | 21 +++++++++++- types/google-publisher-tag/index.d.ts | 33 +++++++++++++++++++ 2 files changed, 53 insertions(+), 1 deletion(-) diff --git a/types/google-publisher-tag/google-publisher-tag-tests.ts b/types/google-publisher-tag/google-publisher-tag-tests.ts index d64149ec3e166d..daab32d7c6febd 100644 --- a/types/google-publisher-tag/google-publisher-tag-tests.ts +++ b/types/google-publisher-tag/google-publisher-tag-tests.ts @@ -1,5 +1,5 @@ // Tests for Google Publisher Tag 1.20260309 -// Synced from: https://github.com/googleads/google-publisher-tag-types/commit/27374b01c38e0f8a66fe8181574edee6d5570200 +// Synced from: https://github.com/googleads/google-publisher-tag-types/commit/b016c4944f367bc81fd32a072d0648154987849d // Test for googletag.cmd function test_googletag_cmd() { @@ -666,6 +666,16 @@ function test_googletag_config_adExpansionConfig() { }); } +// Test for googletag.config.AutoRefreshConfig.heavyAds +function test_googletag_config_autoRefreshConfig_heavyAds() { + // Set the auto refresh configuration, disabling auto refresh on heavy + // ad intervention. + googletag.setConfig({ autoRefresh: { heavyAds: false } }); + + // Clear the auto refresh configuration, restoring to default behavior. + googletag.setConfig({ autoRefresh: null }); +} + // Test for googletag.config.PageSettingsConfig.threadYield function test_googletag_config_pageSettingsConfig_threadYield() { // Disable yielding. @@ -816,6 +826,15 @@ function test_googletag_config_pageSettingsConfig_adsenseAttributes() { googletag.setConfig({ adsenseAttributes: null }); } +// Test for googletag.config.PageSettingsConfig.autoRefresh +function test_googletag_config_pageSettingsConfig_autoRefresh() { + // Set the auto refresh configuration. + googletag.setConfig({ autoRefresh: { heavyAds: false } }); + + // Clear the auto refresh configuration. + googletag.setConfig({ autoRefresh: null }); +} + // Test for googletag.config.PrivacyTreatmentsConfig.treatments function test_googletag_config_privacyTreatmentsConfig_treatments() { // Disable personalization across the entire page. diff --git a/types/google-publisher-tag/index.d.ts b/types/google-publisher-tag/index.d.ts index 1acf1a54813180..f65fde45470b27 100644 --- a/types/google-publisher-tag/index.d.ts +++ b/types/google-publisher-tag/index.d.ts @@ -1864,6 +1864,27 @@ declare namespace googletag { adsense_test_mode?: "on" | null; } + /** + * Auto refresh configuration settings. + */ + interface AutoRefreshConfig { + /** + * Whether GPT will automatically refresh an ad slot if Chrome's Heavy Ad + * Intervention triggers on the slot's ad iframe. Defaults to `true`. + * + * @example + * // Set the auto refresh configuration, disabling auto refresh on heavy + * // ad intervention. + * googletag.setConfig({autoRefresh: {heavyAds: false}}); + * + * // Clear the auto refresh configuration, restoring to default behavior. + * googletag.setConfig({autoRefresh: null}); + * + * @see [Understand Chrome's Heavy Ad Interventions](https://developer.chrome.com/docs/web-platform/heavy-ads-intervention) + */ + heavyAds?: boolean; + } + /** * Settings to control the use of lazy loading in GPT. * @@ -2279,6 +2300,18 @@ declare namespace googletag { * googletag.setConfig({adsenseAttributes: null}); */ adsenseAttributes?: AdSenseAttributesConfig | null; + + /** + * Setting to configure automatic ad refresh behavior. + * + * @example + * // Set the auto refresh configuration. + * googletag.setConfig({autoRefresh: {heavyAds: false}}); + * + * // Clear the auto refresh configuration. + * googletag.setConfig({autoRefresh: null}); + */ + autoRefresh?: AutoRefreshConfig | null; } /**