GPT release notes

This page documents production updates to the Google Publisher Tag (GPT) library. You can periodically check this page for announcements about new or updated features, bug fixes, known issues, and deprecated functionality.

To have updates delivered to you, add the URL of this page to your feed reader of choice, or use a direct link to the release notes feed in either Atom 1.0feed icon or RSS 2.0feed icon format.

Understanding release dates

All changes to the GPT library are thoroughly tested before release. Additionally, releases are rolled out to users gradually to further protect against unexpected regressions. If a regression is spotted at any point during a rollout, the entire release can be quickly abandoned before it reaches all users.

Due to this, release dates are not exact; a release can can take anywhere from a few days to a few weeks to roll out completely. This means that users will encounter changes at different times. The dates provided below reflect the start of the week in which a change finished rolling out to all users.

Week of February 19, 2024

Added navBar interstitial trigger, which can display a GPT-managed interstitial ad when a user interacts with the browser navigation bar. This feature is desktop only.

See Display a web interstitial ad for an example.

Week of February 12, 2024

Fixed a bug where SlotRenderEndedEvent.slotContentChanged was always true. Going forward, this property will only be true if the content of the slot changed, and false otherwise (for example, if an ad did not fill).

Week of January 29, 2024

Network failures for ad requests will mimic a no fill by firing a googletag.events.SlotRenderEndedEvent with isEmpty set to true. See Ad event listeners for example of how to listen to this event. Change includes automatically collapsing the slot when using collapseEmptyDivs.

Week of December 11, 2023

Week of November 13, 2023

Added support for Chrome prerendering. When GPT detects the page is in a prerender state, the ad request will be delayed until the page becomes visible to the user.

Week of October 23, 2023

Week of July 24, 2023

The Protected Audience API (formerly known as FLEDGE) is transitioning to general availability with the July release of Chrome. With this, component auction-related functionality in GPT is now considered stable.

Week of June 19, 2023

Update: Beginning on or after July 5, 2023, GPT will no longer serve outdated versions of its Javascript library, nor serve ads to those versions. See the previous announcement for details.

Publishers serving from www.googletagservices.com/tag/js/gpt.js may continue to do so. However, switching to the preferred domain is recommended, as it may improve performance and serving of gpt.js on www.googletagservices.com may be discontinued in the future.

Week of June 6, 2023

Beginning on or after July 5, 2023, GPT will no longer serve outdated versions of its JavaScript library. There is no impact to publishers loading GPT from an official URL. Publishers who are serving a cached version of gpt.js, pubads_impl.js, or any libraries they load must update their pages to use the official URLs. For more information, see the Get started guide.

Week of May 22, 2023

Negative and zero size values provided to googletag.defineSlot() and SizeMappingBuilder.addSize() are now automatically removed, as they are invalid. As a result, existing integrations that provide such invalid values may see an increase in publisher console messages. However, this will have no effect on existing, valid ad requests.

Week of May 18, 2023

Installation of Secure Signals bidder scripts by GPT will now be done earlier in GPT's execution. This may result in improved signal coverage across ad requests.

Week of May 1, 2023

Fixed a bug where creative could appear truncated when refreshing multi-size anchor slots.

Week of March 27, 2023

GPT no longer supports viewability based features on browsers that do not natively support the Intersection Observer API. Note that all supported browsers natively support this API.

Method or Event
googletag.events.ImpressionViewableEvent
googletag.events.SlotVisibilityChangedEvent
googletag.pubads().enableLazyLoad()

Week of February 6, 2023

Week of January 30, 2023

The behavior of Service.addEventListener() has been changed so that when an event occurs all of the associated listeners execute before processing a later event. Prior to this change, slot render start and end event listeners for the same slot could execute out of order.

Week of August 15, 2022

Return type of Service.removeEventListener() has been changed from boolean to void.

Week of July 25, 2022

Added experimental support for FLEDGE component auctions, to enable early testing of FLEDGE with multiple sellers.

New in GPT
Method Slot.setConfig()
Object ComponentAuctionConfig
SlotSettingsConfig

Week of July 18, 2022

The ContentService API has been sunset. Calling googletag.content().setContent now has no effect besides logging a warning. The googletag.content property will soon be removed entirely; after that, attempting to call it will throw an exception. Use the browser's built-in DOM APIs to directly add content to div elements instead.

Week of May 23, 2022

Added support for configuring ad request traffic source.

GPT support for traffic source
Enum TrafficSource.ORGANIC
TrafficSource.PURCHASED
Property PrivacySettingsConfig.trafficSource

Week of March 7, 2022

Rewarded ads for web have launched. Visit the Ad Manager help center for details.

GPT support for rewarded ads for web
Enum OutOfPageFormat.REWARDED
Event RewardedSlotClosedEvent
Event RewardedSlotGrantedEvent
Event RewardedSlotReadyEvent
Object RewardedPayload

Week of February 28, 2022

CommandArray.push now explicitly binds provided functions to globalThis instead of its own arguments object.

Week of December 8, 2021

Enums now also expose a reverse mapping of values to keys in order to match behavior of TypeScript enums. APIs that take enum values remain unchanged, and these new reverse mappings should not be used.

Week of August 9, 2021

Added the removeEventListener method.

Calling addEventListener multiple times with the same eventType and callback function instance is now a no-op. In other words if a single callback function instance is registered n times for the same event type, it will only execute once when the event occurs, rather than n times.

Week of July 29, 2021

GPT's viewability events: ImpressionViewableEvent and SlotVisibilityChangedEvent will now continue to fire on long page sessions. Previously, they had shut down after one hour from page load.

Week of May 03, 2021

GPT no longer sets space for slots before fetching ads. This change reduces Cumulative Layout Shift (CLS) on sites that have not reserved space using CSS. To further reduce CLS on your site, we recommend reserving nonzero area for the ad using CSS. Learn more

Week of March 22, 2021

Updated the behavior of enableLazyLoad() to also delay rendering of below-the-fold slots on background tabs.

Week of February 23, 2021

The googletag.pubads().set and Slot.set methods may now be called at any time before display or refresh. Previously set only applied when called before googletag.enableServices.

Week of February 16, 2021

The googletag.pubads().setPublisherProvidedId API may now be called at any time. Previously it only worked if called before googletag.enableServices.

Week of January 4, 2021

The googletag.pubads().collapseEmptyDivs API may be called repeatedly now to change settings. Previously repeated calls would be ignored.

Week of October 12, 2020

Launched web interstitial open beta, see help center.

Week of August 31, 2020

Deprecated definePassback() and defineOutOfPagePassback(). See passback docs for how to correctly create a passback.

Week of June 15, 2020

Updated the behavior of enableLazyLoad() to be compatible with collapseEmptyDivs(true).

Week of May 25, 2020

GPT will no longer support precise GPS location set by publishers. Specifically, googletag.pubads().setLocation() will no longer support latitude, longitude, or radius parameters, but will instead take a freeform address.

Week of April 27, 2020

GPT rendering logic is no longer modularized into separate files. This means that GPT will fetch fewer files in its execution, and thus slightly reduces latency, but has no net impact on user bandwidth.

When a request is triggered in GPT (by calling googletag.display() or googletag.pubads().refresh()), we will now internally freeze all publisher provided state so that it cannot be mutated before the request is sent. Therefore, when a request triggers, only the state added up until that point will be used for that request. Any state which is modified after that will only apply to the following requests.

Week of November 11, 2019

There is now a new recommended snippet for creating GPT passbacks. Use of definePassback() and defineOutOfPagePassback() is discouraged, since these functions behave synchronously and may be blocked by certain browsers. Learn more.

Added PubAdsService.setPrivacySettings() as a new method of enabling privacy settings. Additional settings will be available here in the future.

Week of March 25, 2019

Pubads service is now fully operational immediately after calling googletag.enableServices() instead of being initialized asynchronously. This means that googletag.pubadsReady is now guaranteed to be true right after calling googletag.enableServices(). Polling to check the value of googletag.pubadsReady should no longer be necessary.

Week of February 4, 2019

Updated the behavior of enableLazyLoad() to allow changes to lazy loading config after calling enableServices(), with lazy loading config frozen for each slot when that slot is displayed.

Week of January 21, 2019

Added a new supported event, SlotResponseReceived, which fires when an ad response is received for a slot.

Week of January 14, 2019

Added a new supported event, SlotRequestedEvent, which fires when an ad request is made for a slot.

Week of August 27, 2018

Modified googletag.display() to accept a googletag.Slot as an argument.

Week of August 6, 2018

Adds googletag.PubAdsService.enableLazyLoad() for lazy loading ads in GPT.

Week of June 18, 2018

Fixed a bug which caused the googletag.events.SlotOnloadEvent to not trigger.

Week of April 30, 2018

Adds googletag.PubAdsService.setTagForUnderAgeOfConsent() for controlling ads for users under the age of consent, and googletag.PassbackSlot.setTagForUnderAgeOfConsent() for marking the passback slot as coming from a user under the age of consent.

Week of April 23, 2018

Adds googletag.PubAdsService.setRequestNonPersonalizedAds() for controlling ads personalization.

Week of March 12, 2018

Rolled back change which stopped removing existing content inside of slots prior to refreshing, if that content was not placed there by GPT. Contents will now be cleared.

Week of February 19, 2018

When asynchronous rendering mode is used: Request ads using XMLHttpRequest with the HTTP GET method where possible for all ad requests, up to the 8,192 character limit. Previously, the HTTP POST method would have been used for ad requests exceeding 4,096 characters, up to the 8,192 character limit.

Stopped removing existing content inside of slots prior to refreshing, if that content was not placed there by GPT. This note is incorrect; see entry for Week of March 12, 2018

Week of January 8, 2018

Support alternate syntax of [..., ['fluid'], ...] as a NamedSized within a multi-size array. Previously only [..., 'fluid', ...] was considered valid.

Week of July 10, 2017

Removed labelIds field from googleTag.ResponseInformation.

Week of June 5, 2017

Modified googletag.display() and googletag.pubads().display to accept a div element as well as a div ID. This allows rendering slots inside divs which are in a shadow DOM.

Week of February 27, 2017

Week of November 7, 2016

Released getSlots() API on Service for retrieving the list of slots associated with a service.

Week of October 17, 2016

Modified both Slot.clearTargeting() and PubAdsService.clearTargeting() to take an optional key parameter.

Week of September 5, 2016

Errors caught in googletag.cmd.push() are no longer invisible, and will be printed to the console.

Week of August 8, 2016

Released SlotOnloadEvent API to allow listening for a creative to finish loading.

Week of July 25, 2016

Released getTargeting() and getTargetingKeys() APIs on PubAdsService for retrieving custom service-level targeting parameters.

Week of June 20, 2016

Released openConsole() API to open the Google Publisher Console without the need for a page refresh.

Week of June 6, 2016

Released getTargeting() and getTargetingKeys() APIs for retrieving custom targeting parameters.

Adding configuration option where Safeframe should allow expand by pushing content: allowPushExpansion.

Week of May 16, 2016

Support fluid size in multi-size ad requests.

Week of April 18, 2016

Released getResponseInformation API which returns ad response information for the ad slot.

Released setAdIframeTitle API which sets the input as the title of any ad container iframes that are created after.

Week of April 4, 2016

Increased HTTP GET ad request max length to 4,096 characters.

Week of March 28, 2016

Adding configuration option where Safeframe should allow expand by overlaying content: allowOverlayExpansion.

Adding configuration option where SafeFrame should use the HTML5 sandbox attribute to prevent top level navigation: sandbox.

Week of February 22, 2016

Adding ability to set titles for ad container iframes: setAdIframeTitle().

Adding an API to configure SafeFrame properties on page and slot level: setSafeFrameConfig().

Week of February 15, 2016

Adding ability to destroy a slot and re-use the div: destroySlots().

Adding an API to force the use of safeframe on ad slots with granular controls: setForceSafeFrame().

Week of December 7, 2015

Adding slot visibility events (SlotVisibilityChangedEvent).

Week of October 26, 2015

Adding impression viewability (ImpressionViewableEvent).

Update passback targeting from a JSON map (Passback.updateTargetingFromMap()).

Support of set() and get() AdSense attribute page_url for passback slots.

Week of October 12, 2015

Support for out-of-page passback.

Week of August 31, 2015

Restructuring GPT architecture into a thin loader and a bigger implementation.

Support for fluid size in GPT.