Optimize module speed by updating the hosted library domain

Created on 12 August 2022, over 2 years ago
Updated 23 July 2023, over 1 year ago

Problem/Motivation

In November 2020 Google updated their guidance to change the Google Publisher Tag Library from www.googletagservices.com/tag/js/gpt.js to securepubads.g.doubleclick.net/tag/js/gpt.js

You can see that update here: https://web.archive.org/web/20201111220630/https://support.google.com/ad...

The Google Publisher Tag library is now hosted at https://securepubads.g.doubleclick.net/tag/js/gpt.js, in addition to being hosted at the googletagservices.com domain. While not required, we strongly recommend that you update all references to GPT on your pages to use this new domain.

This change consolidates all ad serving requests to one domain, instead of two, which means the browser only needs to connect to one domain. The library is exactly the same at both domains.

The result is an improvement in the speed of your tags and fetching ads a bit quicker.

Update: July 2023

On September 18th, we will stop serving GPT tag versions that are outdated. At this time, we will also reject ad requests from old versions of the GPT library. As we have stated in the past, loading GPT from unofficial URLs can open publishers to security vulnerabilities. Due to this, loading GPT from unofficial URLs or rehosting it from your own servers is not supported.

The page has since been updated and doesn't call this out anymore, but the library url is still `securepubads.g.doubleclick.net/tag/js/gpt.js`

Proposed resolution

Replace all occurrences of www.googletagservices.com/tag/js/gpt.js with securepubads.g.doubleclick.net/tag/js/gpt.js

Feature request
Status

Fixed

Version

1.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024