Help improve the Google Publisher Tag developer experience. Share your thoughts in our survey.

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