Publishers not familiar with dev work usually have a hard time getting Google Publisher Tag slots to work. Here are some common GPT mistakes to avoid.

The Google Publisher Tag (GPT) is an ad tagging library for Google Ad Manager that can dynamically build ad requests. GPT takes key details such as ad unit name, ad size, and custom targeting then builds the request and displays the ad on webpages.

Publishers not proficient with development work usually have a hard time figuring out and getting the GPT slots to work. Here are some common GPT mistakes that you can avoid to make sure everything is correctly configured.

1. Not Matching the Number of Ad Request and Ad Display Calls

This is the most common mistake. The GPT function consists of two parts. One of those parts is used for defining the slots (gpt.define) and the other is used for displaying the slots (gpt.display). A common thing we see occur during implementation is not matching the number of define and display calls. Publishers often end up not displaying all the tags that are defined or end up displaying ad tags that are not defined in the first place. Both of these causes the GPT library to throw errors.

2. Using Multiple Define Calls in the Head Section

A single GPT ad unit can be defined with a lot of ad sizes. What that basically means is that all the sizes defined (that are included in the define call) will be eligible to be served on that very ad unit.

This is what a sample ad call looks like.

googletag.defineSlot("/1234/travel/asia", [[468, 60], [728, 90], [300, 250]], "div-gpt-ad-123456789-1")

Here, all sizes 468×60, 728×90, 300×600, and 300×250 are eligible to serve ads on the slot. But often, publishers end up defining the slot more than once just to get different ad sizes to be defined in different lines. In comparison to the above-stated example, this is what the publishers try to do.

googletag.defineSlot("/1234/travel/asia", [[468, 60]], "div-gpt-ad-123456789-1")
googletag.defineSlot("/1234/travel/asia", [[728, 90]], "div-gpt-ad-123456789-1")
googletag.defineSlot("/1234/travel/asia", [[300, 600]], "div-gpt-ad-123456789-1")

This lends a different meaning to the call and what the publisher ends up doing is defining the ad call three times (and only making one display call) which eventually results in errors. What they also end up doing is using different div ID’s in the <head> and <body> section which again leads to GPT library errors.

3. Removing the GPT Push Queue

This is what a normal GPT ad call looks like:

googletag.cmd.push(function() {
googletag.defineSlot('/1234567/sports', [160, 600]).

Publishers often forget to wrap their GPT code inside the queue. When the GPT JavaScript is loaded, this queue looks through the array and executes all the functions in order. This mechanism allows GPT to reduce latency by fetching the JavaScript asynchronously while allowing the browser to continue rendering the page. All GPT calls are wrapped around this function queue.

4. Not Maintaining Correct Order of GPT Calls

This is the usual order that needs to be followed when using GPT. If this order is changed, it will cause the GPT failing to call and thereby render the calls ineffective.

  1. Define page-level settings
  2. Define slots
  3. enableServices()
  4. Display slots

Note: 2 and 3 are interchangeable.

Publishers who just use any other order of calling to render a creative might see discrepancies in the reporting along with the ads not being visible in some cases.

Given the breadth of mistakes committed during the GPT implementation, it is impossible to cover them all in one post, but this list covers the most common ones, for the rest—it is best to refer to the official Google documentation. Google updates the list of common and new errors on the official GPT page.


1. What is Google Publisher Tag?

With Google Publisher Tag (GPT), publishers can define inventory, initiate and bundle ad requests, and render matching demand. You provide key details to GPT (such as ad unit code, ad size, and key-values), which is then used to build the request and display the ad.

2. What is Google Ad Manager used for?

Google Ad Manager is an ad management platform for large publishers with significant direct sales. Several ad exchanges and networks are supported by Ad Manager, including AdSense, Ad Exchange, third-party networks, and third-party exchanges.

3. What is passback tag?

When a third-party server does not have an ad to serve or the ad does not meet the minimum CPM/floor price the third party has agreed upon, passback tags can be used.


Shubham is a digital marketer with rich experience working in the advertisement technology industry. He has vast experience in the programmatic industry, driving business strategy and scaling functions including but not limited to growth and marketing, Operations, process optimization, and Sales.

Write A Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Recent Posts