Tag Archives: GPT

Securing Google Publisher Tags with Content Security Policy

The Google Publisher Tag (GPT) now supports integrating with a Content-Security-Policy (CSP). Using a CSP, you can precisely control which external sources are allowed to load on your site, on a page-by-page basis. In this way, CSPs help to detect and defend against common web vulnerabilities such as cross site scripting (XSS) attacks.

Although CSPs can be implemented in a number of ways, GPT only supports the strict CSP method, using nonces. For detailed instructions on setting this up, see our guide on Integrating with a Content Security Policy.

A note on existing CSPs

While GPT did not previously support CSPs, we're aware that some publishers worked around this by using CSPs based on an allowlist of domains. As previously mentioned, however, only nonce-based strict CSP implementations are supported. This is due to the fact that the set of domains GPT accesses is subject to change over time.

If you've been using GPT with an allowlist-based CSP, we strongly recommend that you supplement or replace it with a nonce-based strict CSP policy. This will reduce the risk that a future change to GPT may break ad serving on your page.

Help improve the Google Publisher Tag developer experience

We’re constantly working to improve our offerings for Google Publisher Tag (GPT) developers. Whether it's writing guides, producing samples, or building tools like the Google Publisher Console and Publisher Ads Audits for Lighthouse, we strive to equip you with everything you need to succeed.

To better understand what's working and what needs improvement, we're asking our developer community for feedback. Starting today, we're launching the first Google Publisher Tag developer survey.

Take the survey


All questions in the survey are optional and your answers will be completely anonymous. We expect the survey to take about 10 minutes to complete, and it will be open through the end of September 2020.

The feedback you provide will directly impact what we work on over the course of the next year, so please let us know what matters most to you. Thanks in advance for taking the time to help improve the GPT developer experience.

Brotli Compression in Google Display Ads

Posted by Michael Burns, Software Engineer, Publisher Tagging & Ads Latency Team

Our goal is to help publishers monetize their content and build sustainable businesses through advertising products that allow sites to load as fast as possible to minimize impact to user experience.

Almost two years ago, our compression team announced a new compression algorithm called Brotli. Today, we are happy to announce that the Brotli compression algorithm is now being used to compress Google Display Ads whenever possible. In our experiments, we see data savings of 15% in aggregate over standard gzip compression, and in some instances, a savings of over 40%! This reduces the amount of data sent to end users by tens of thousands of gigabytes every day! This also results in faster page loads and less battery consumption.

We hope results like this will encourage wider adoption and will advance web standards such as Brotli compression.

Weight Watchers weighs in on their success with Google Publisher Tag and DFP

A top name in weight loss and healthy living for 50 years, Weight Watchers serves over 140 million ad impressions a month at WeightWatchers.com.

Weight Watchers began using the Google Publisher Tag (GPT) in 2012 once they upgraded to the DoubleClick for Publishers (DFP) ad server. They were hoping for better targeting, but they got much more.

Higher ROI, happier advertisers
With up to five levels of targeting hierarchy, GPT let Weight Watchers improve its targeting and end manual re-tagging. The results have been strong with Click Through Rates across all standard display ad units are up 13%, and for leaderboards up 76%. Advertisers are loving the performance and Weight Watchers now runs four times more monthly campaigns with advanced targeting than with basic demographic and geo-targeting.

100% boost in operational efficiency from DFP

"I would actually say we've had a 100% increase in efficiency," says Jordan Tuck of Weight Watchers. Campaign setup is faster, and new features like the ability to update multiple line items on the same page save even more time later.

30% rise in indirect inventory earnings

With the move to DFP, Weight Watchers benefited from Dynamic Allocation with DoubleClick Ad Exchange (AdX) to monetize indirect inventory. Their indirect inventory rates are up 30% year-over-year, and the clickthrough rate is 2.5 times higher than it was before AdX. AdX now has 70% share of their indirectly sold inventory.

Weight Watchers helps its customers "move the needle," and DFP and AdX have helped them do the same with their own online properties.

Read the full Weight Watchers story »

Posted by Yamini Gupta, Product Marketing Team