Untitled UI logotext
Solutions
Arrow down icon
Products
Managed with Fuse
Fuse Enterprise
Technology
Fuse icon in black
Fuse
Fuse Platform
Use Cases
Using AdSense
Retail Media
Existing Ad Management
Direct and programmatic
Case Studies
Auto
Forum
Puzzle
Weather
Editorial
News
Tool
All
See all
Resources
Arrow down icon
Resources
AdTeach
Blog
Ad Formats
Ultimate Core Web Vitals Guide for Publishers
We chat with James Nielsen, Publift's Head of Onboarding, about Core Web Vitals (CWV), why it's important for publishers, and what they can do to optimize their CWV health.
Watch now
Forward arrow icon in white with black background
Best High CPM Ad Networks for Publishers in 2024
Wondering which is the best high CPM ad network? Here is a list of the best high CPM ad networks in 2024.
Read now
Forward arrow icon in white with black background
About
Arrow down icon
About
About Publift
How It Works
Customer Experience
Careers
Newsroom
Book a demo
User iconSearch icon
Solutions
Down arrow icon
Products
Managed with Fuse
Fuse Enterprise
Technology
Fuse technology icon in white
Fuse
Use Cases
Using AdSense
Retail Media
Existing Ad Management
Direct and programmatic
Case Studies
Auto
Forum
Puzzle
Weather
Editorial
News
Tool
All
Resources
Down arrow icon
Resources
AdTeach
Blog
Ad Formats
Ultimate Core Web Vitals Guide for Publishers
We chat with James Nielsen, Publift's Head of Onboarding, about Core Web Vitals (CWV), why it's important for publishers, and what they can do to optimize their CWV health.
Watch now
Forward arrow icon in white with black background
Best High CPM Ad Networks for Publishers in 2024
Wondering which is the best high CPM ad network? Here is a list of the best high CPM ad networks in 2024.
Read now
Forward arrow icon in white with black background
About
Down arrow icon
About
About Publift
How It Works
Customer Experience
Careers
Newsroom
Book a demo
Book a demo
User iconSearch icon
Book a demo
User iconSearch icon
Close icon to exit the modal
Search icon
Close icon to exit the modal
Sign up to Publift Scoop
Subscribe to the Publift newsletter for all the latest news, updates and insights from across the industry.
Publishers
All

Google Publisher Tags: The Ultimate Guide

Meta Description: Are you a publisher who is new to Google Publisher Tags? Our guide to GPT will help get you started using GPT to serve ads and start monetizing your content today.

Brock Munro
5
mins read
September 18, 2024
Share
Facebook Twitter LinkedIn Email
Facebook
Editorial Policy
Learn more
Our content is crafted through collaboration amongst our team of experts, or "Publifters," combined with ongoing research into the latest industry updates. To effectively support publishers, we follow a meticulous process for every piece of content we create, whether it's a blog, case study, or video.
contents
Contents

Since the inception of digital advertising in 1994, when the first-ever ad was placed on a website, the industry has been using the same technology to serve ads to web pages- The Ad server. Google Ad Server is the most popular ad server,  with 80% of the U.S. market for search ads, accounting for the bulk of its $116.3 billion in total ad revenue last year. 

Ad tags are an integral part of the ad serving process. They are a snippet of code that reserves a space on a website for ad creative until the ad is served. Ad tags facilitate communication between publishers, advertisers, and ad exchanges. 

There are several types of ad tags available in Google Ad Manager, including:

  • Accelerated Mobile Page Tags for use with AMP pages
  • Mobile Application Tags for serving ads on mobile app inventories
  • Ad Exchange Tags for publishers integrating Ad Exchange with Google Ad Manager; and 
  • Google Publisher Tags for building and serving ad requests

According to Google Developer, Google Publisher Tag (GPT) ‘ is an ad tag library which allows publishers to define inventory, initiate and bundle ad requests, and render matching demand’. For digital publishers working with ads to monetize their website, it is essential to understand how the GPT library works and how they can leverage google publisher tag GPT to generate maximum return on their advertising investment. 

What is Google Publisher Tag?

Google Publisher Tag is an ad tagging library that enables publishers to dynamically build ad requests for ad units. It allows publishers to define ad settings within the code and set targeting options for different ad slots, giving publishers control in creating and serving ads on the inventory.

Google Publisher Tags consists of vital details about the ad unit, including the ad unit size, ad size, and other information to enable key-value targeting.

A simple GPT defining the ad size  will appear as such:

GPT code defining key values such as ad size

How Does Google Publisher Tag Work?

GPT works by providing a communication channel for ad calls between the ad server and the user’s browser, allowing the site to render ads from the Google Ad Server. 

Here’s how Google Publisher Tags work:

  1.  A visitor navigates to the publisher’s web page. The user’s browser then makes a request to the ad server looking for the GPT javascript code.
  2. Next, the GPT ad tag code generates one or more requests and forwards them to the Google ad server.
  3. The ad server then reads the request, recognizing all the relevant key values contained in the ad unit, such as the ad layout, size, and targeting.
  4. The ad server then evaluates the best matching ad and returns the ad code to tagging JavaScript.
  5. Finally, GPT takes key details tagging Javascript file and the ad server runs the in the available ad slots.

Benefits of Google Publisher Tag

Google Publisher Tags offer several benefits, such as:

Access to Google Publisher Console

GPT enables publishers to access the Google Publisher Console, a support tool consisting of built-in debugging tools that help publishers troubleshoot any issues they are experiencing as they build ads.

Asynchronous Rendering

Google Publisher Tag also facilitates asynchronous rendering, whereby the GPT javascript renders without blocking the page rendering and vice-versa. This leads to reduced page latency and improved page load time. Publishers also have the option to render their page’s content synchronously if they so choose.

Cache Busting

Google Publisher Tag GPT also offers a cache-busting element meaning that the ad server returns ads from the server rather than the browser cache.

Multi-Level Inventory Hierarchy

Multi-level inventory hierarchy allows publishers to set multiple line items with desired granularity for custom targeting. Publishers can use page-level targeting and inventory level targeting. 

Responsive Ads

Google publisher tag works with responsive ad units, allowing ad requests for multiple devices such as desktop and mobile, regardless of ad size. This means ads are served with optimal resolution without needing multiple line item setups.

Single Request Architecture (SRA)

Single request architecture allows GPT to bundle ad requests, sending multiple requests to the ad server simultaneously and consequently improving page load time.

SSL support

GPT offers SSL support, so whether URLs begin with HTTPS:// or HTTP://, publishers don’t have to modify their GPTs. Regardless of whether they are secure webpages and unsecured webpages, there is no need to change the tag in any way for serving on a secure page.

Getting Started with GPT in Google Ad Manager

Getting started with Google Publisher tags is simple once you have access to an Ad Manager account.  

The following steps will allow publishers to generate GPT in Google Ad Manager.

  1. Firstly, sign in to the Google Ad Manager account
  2. From here, navigate to Inventory > Ad units and select the ad unit for which you wish to generate the ad tag
  3. On the right-hand side of the page, click on Generate tags, and select the ad tag type Google Publisher Tag.
  4. Click continue
  5. Set custom attributes you want to define the functioning of your GPT. Ensure you check GPT properties carefully before the next step.
  6. Click Continue
  7. Finally, save your settings which will give you the tag to paste into your web page's source code.

Some Common GPT Errors

While GPT is relatively straightforward to implement, as with any tag code built, publishers may encounter some issues along the way. Here are some common errors as defined by Google Developers, and some suggested solutions.

Error 1: Relying on Gpt.js Script Tag Listeners

As we can see in the following example, relying in any way (including frameworks) on the API from within event listeners attached to the script tag is incorrect.

GPT error relying on gpt.js script tag listeners

Solution:

Ensuring that the googletag.cmd  exists  (as you can see in the below code)  should fix this scenario. This is because the googletag.cmd maintains a list of commands that will be run as soon as GPT is ready, meaning your callback is run when GPT has loaded.

Solution to Gpt.js Script Tag Listeners issue in GPT

Error 2 –Misusing Closures and JavaScript Variable Scoping

This error occurs when the code script contains incorrect assumptions about Javascript variable scoping and the value of the variables passed to googletag.cmd.push.

Error Misusing Closures and JavaScript Variable Scoping in GPT

Solution: When working with javascript, closures capture variables by reference rather than by value. Therefore, if a variable is reassigned, its new value will be used when the function closure that captured it is later executed. This can cause problems in the case of asynchronously loaded GPT. TO avoid any issues with the above situation, care should be taken with  regards to scoping rules of JavaScript. The code should also be written without the assumption that functions placed on the command queue will execute immediately, as seen below.

Solution to Misusing Closures and JavaScript Variable Scoping

Google Ad Manager comes with various functions and features to assist multiple demand partners in serving ad units and monetizing their site content. With GPT, publishers can define inventory, initiate and bundle ad requests, and then render specifically targeted ads tagged with their desired key values.

Google GPT offers many benefits over other ad tags, including the ability to render ads asynchronously and serve up dynamic ads in multiple sizes for a range of different devices.

Fuse Platform- One Tag to Solve All Your Ad-Unit Problems

As demonstrated above, even the most experienced web admins may encounter problems when using a GPT ad tag to create an ad request for their web pages.

Publift's Fuse platform is the ultimate all-in-one programmatic advertising solution for web and app publishers.

To start experiencing the power of Fuse on your site, simply replace your current AdSense, Ad Manager, AdMob or third-party tag/ SDKs with our Fuse technology. Once your tags are on the page, our expert team will be able to test, analyze and optimize your setup to maximize revenue. 

If you’re making more than $2,000 in monthly ad revenue, contact us today to learn more about how Publift can help increase your ad revenue and best optimize the ad space available on your website or app.

Share
Facebook Twitter LinkedIn Email
Facebook
Written by
Brock Munro
Brock is the Head of Product & Yield at Publift. He has been a pioneer in the business since he began his adtech journey in 2016. From starting as an Account Manager to now leading the Yield Management team, direction of our Product, and being in the industry for close to a decade, Brock has been able to observe the evolution of adtech and hone a deep understanding of the ecosystem.
Follow
Linkedin

Related

Publift Supported Identity Solutions

Discover how Publift’s identity solutions help publishers maintain ad revenue and relevancy in a cookie-less world using first-party data and contextual targeting.

All
All
Company Updates
All
Brock Munro
mins read
Best Affiliate Marketing Strategies To Follow In 2024

Improve your affiliate marketing game in 2024 by using effective strategies to increase revenue and engage your audience.

Insights
All
Publishers
All
All
All
Brock Munro
16
mins read
Back to all articles

Are you ready to power-up?

Get started

Publift Scoop

Publift Scoop

Sign up to the Publift newsletter for all the latest news, updates and insights from across the industry.
Sign up
Publift logo
Where you'll find us
Dublin

Level 2, Park House, 

Frascati Road,
Blackrock,
Dublin, Ireland
Sydney
Level 1, Building 5, 

The Mill 41-43 Bourke Rd

Alexandria, NSW 2015,
Australia
Product
Fuse TechnologyManaged with FuseFuse Enterprise
Use Cases
Direct and programmatic
Existing Ad Management
Retail Media
Using AdSense
Resources
AdTeachBlogAd FormatsCase StudiesJargon GlossaryFAQs
About
About PubliftHow It WorksCustomer ExperienceCareersNewsroomBook a DemoContact Us
Calculators
Conversion Rate Calculator
eCPM Calculator
CPM Calculator
CPA Calculator
CPC Calculator
CTR Calculator
Follow Us
LinkedInX(Twitter)FacebookInstagramYouTube
Privacy PolicyCookie NoticeTerms of Service