Home » WordPress Development » Build functional, flexible Google Ad Manager integrations in WordPress

Build functional, flexible Google Ad Manager integrations in WordPress

Google Ad Manager is an industry standard platform that offers an array of features designed to streamline your ad inventory and maximise revenue-generation potential.

A must-have tool for most publishers with a display advertising-based revenue model, Google Ad Manager serves as an all-in-one monetisation system to help you create more effective (and lucrative) client marketing solutions


Yet simply installing Ad Manager isn’t enough to succeed. Like most things in business, your power lies in the execution.


In this article you’ll learn:

  • The best way to set up Ad Manager for your publishing site
  • How to avoid costly Ad Manager mistakes
  • How to build flexible integrations between Ad Manager and WordPress


But before we get technical, here’s a quick Ad Manager crash course to familiarise yourself with the platform.


What is Google Ad Manager?


Google Ad Manager is a central hub and ad exchange platform that gives you full control over:

  • Where ad units (spaces) are situated on your site
  • How your adverts look, feel and function
  • How ads are monetized across multiple networks and locations
  • Campaign data, queries and insights
  • Audience targeting and tagging
  • Conversion tracking


Ad Manager works in tandem with the tag library, Google Publisher Tags (GPT), which ‘tags’ each page with a snippet of code. This code provides audience information so that Ad Manager can serve the most relevant ad for that page.



Where Ad Manager can go wrong for publishers


One of the general drawbacks of having adverts on your website is their impact on site performance. It’s a catch 22. Ads generate revenue but they slow your site down. This impacts viewability scores, and your ability to generate future revenue.


As Google research reveals, audiences are an impatient bunch and won’t stick around waiting for a page to load.

Source: Google/SOASTA Research, 2017.


So what can you do to overcome this publishing dilemma?

Two ways to improve site performance using Google Ad Manager:

1. Lazy load your ads

Sometimes referred to as ‘asynchronous loading’, lazy loading is one of the best ways to optimise site performance and improve page load speed.


When an ad is lazy loaded, the load process is deferred until that ad appears in the viewport (i.e when the reader scrolls down). This means it is rendered only once, at the time of viewing.


You’re likely already lazy loading images to your site – so it’s exactly the same process for your ad inventory.

What happens if you don’t lazy load?

Your server records an impression every time an ad loads, regardless of whether a user actually views it. If your site is slow, audiences either bounce or scroll past before it’s had time to load. Audiences that fail to see an ad can’t possibly engage with it, so campaign CTR is adversely affected.


2. Create fewer ad slots (and use better targeting)


Most publishers create far too many ads. It’s one of the first things we review when working with a new client, and it’s not uncommon to see fifty or sixty different ad slots. This is usually unnecessary and brings added complexity to campaign reporting, due to your data being housed in multiple places.


Your ultimate aim should be to have as few ad slots as possible, and use ad targeting to direct the ads to different pages.


When should you create a new ad slot?

The only reason to create a new ad slot is to accommodate a different sized advert.

For example, if a large hero banner was required at the top of one page but wasn’t repeated elsewhere on the site, then you’d create a new ad slot. However, if that banner is featured elsewhere, you’d use targeting to define where it goes.


What about different device sizes?

It is unnecessary to create individual ad slots for different sized devices. You can use targeting to define individual breakpoints for tablets, mobile devices etc. that all use the same ad slot. This reduces the risk of error and means the poor intern setting up Google Ad Manager doesn’t need to repeat themselves multiple times.


Why fewer ad slots means more revenue

When clients book an advertising campaign, they expect to see evidence of the value they’ve received. By consolidating ad slots, your data is aggregated into a single location, thus reducing reporting complexity. This makes it easier to demonstrate to clients the performance of each ad.


Integrating Google Ad Manager and WordPress


We’ve always said that WordPress is the best CMS for publishers that want to scale. It offers the most robust and user-friendly experience. And because it is open source, you have far more options for revenue generation.


WordPress can be integrated with Ad Manager to simplify editorial processes, provide more targeted client solutions and avoid ad placement fails.


How publishers can use the WordPress taxonomy system


Within the WordPress taxonomy API there are numerous refinements that allow you to specify the content type.


For example, if your editorial team tags an article as ‘travel’, Ad Manager can then select ads that meet that criteria and display on that page. So if you’re P&O Cruises, having your brand featured on a page about Greek Island Hopping makes perfect sense.

But what happens when all the travel articles start talking about Covid? Not such a positive brand experience. This is where some more bespoke WordPress development can help.


The WordPress Native Tagging functionality is a quick and easy way to get started. But you don’t typically want tags like bad-news or sponsor-conflict showing up on your site, in sitemaps, SEO, etc.

Utility Tags
This is why we introduce the concept of “Utility Tags” in the CMS backend. The set up is simple, yet incredibly powerful.


Firstly, register a custom taxonomy. This will house all the various tags that act as a mechanism to get additional article metadata through to Google Ad Manager, without the risk of them being publicly visible.

Once the Utility Tag taxonomy is running, your final step is to ensure these tags, (in addition to other post attributes) are all being sent to your data layer and Google Ad Manager targeting.


This solution gives your AdOps team the power to filter and create additional rules all within Google Ad Manager. This ensures brand safety standards are met and clients remain happy. It’s just one example of the many ways WordPress publishers can engineer their technology for greater success.


Alec Arnold

Alec is a WordPress and full stack developer. He specialises in integrations with Apple News, AMP and Google Ad Manager. Alec also has a strong engineering background and works on a lot of our custom functionality projects.

Do you work in digital media or publishing? Join our newsletter.

If you've made it this far on one of our posts, you're probably someone who'd find value in our email newsletter where we send analysis, insights and curated links for the digital publishing and media world. You can subscribe below and opt out any time.