This is the manual of our Google Ad Manager Integration for WordPress.
Table of Contents
Connect to your Ad Manager account
Enable the API in GAM
Before connecting your site to Google Ad Manager, you need to enable the API access option in your account.
- log in to your Google Ad Manager account
- go to Admin > Global Settings > Network Settings > General Settings
- enter a value in the Display name field
- enable the API access option
- click on Save (it is easy to miss at the bottom of the page)
You should be able to connect to the API in a few minutes now.
Connect your site
You need to connect the Google Ad Manager integration to your account in order to load the ads from it.
- go to Advanced Ads > Settings > Google Ad Manager
- click on Connect account
- choose the Google account your Ad Manager is hosted with
- confirm the connection two times
- copy the confirmation code
- paste the confirmation code in the appropriate popup in Advanced Ads and submit it
- if you receive the error that the API needs to be enabled then follow these steps and reload the settings page again
Your Google Ad Manager account should be connected with your site now.
Known issues when connecting to your GAM account
To connect to your Google Ad Manager account, your server must have the
openssl modules enabled. Otherwise, the connection will fail on the settings page.
Especially in the Firefox browser, disable your popup blocker or allow the Google Ad Manager popup temporarily to finish the connection.
Reload the page and try again if the popup with the option to enter the confirmation code does not stop loading. This could happen when the GAM server is temporarily unavailable.
If you are not able to select your Google account or receive a warning (e.g.,
Error 400) then go to google.com and log in there. Now, refresh the Ad Manager connection settings and try again.
Using Google Ad Manager ads
The plugin creates a new ad type called “Google Ad Manager” in Advanced Ads.
When selected, the Ad Parameters box will list all active ad units from your account. Just click on one line to select the ad unit.
Ad units need to be activated in your Google Ad Manager account to show up in the list of available ad units.
The Ad Sizes option allows you to show different ad unit sizes for different screen widths. The available sizes are automatically pulled from the ad unit setup in your Ad Manager account.
Enable the Automatic filter option to only consider ad sizes that fit the width of the container in which the ad is placed.
See also Responsive Google Ad Manager ads.
Key-values targeting allows you to deliver ads based on certain information from your site, like the post category, position of the ad, or user information.
Find more information about key-values in the Google Ad Manager manual.
Notes on the key-values feature
- Key-values are not sent on AMP pages, yet
- The option uses “slot-level” targeting, meaning that key-values are set up for each ad unit individually
- The Post Meta and User Meta conditions work with simple values, not serialized strings containing arrays
- Many key-values that are based on WordPress, like User meta would not work when AJAX cache-busting is used. You normally don’t need cache-busting for Google Ad Manager ads, but in case you do, double-check if key-values targeting is working correctly using the GAM Publisher Console
Known issues when loading ad units
Ads set up as “Smart Banners” in Google Ad Manager are not showing up in the ad list, since they are supposed to be used in Mobile Apps and not on websites.
If you add new ad sizes to your ad units in your Google Ad Manager account then you need to click on the update button at the top of the ad unit list in Advanced Ads 30 minutes after you made the change to load the new code into the plugin.
Collapsing ad units
Set the Collapse empty elements option under Advanced Ads > Settings > Google Ad Manager to define how ad space should behave if ads are not loaded into them.
- Do not collapse – reserves the ad space and even keeps it when no ad was loaded from Google Ad Manager. This is recommended if your ad space always delivers ads and you want to prevent your content from jumping in case an ad is missing.
- Collapse if empty – reserves the ad space and collapses it after Google Ad Manager did not fill it.
- Fill space when ad is loaded – no reserved ad space. It only fills the space when Google Ad Manager has an ad for it.
Issues related to Google Ad Manager
Google Ad Manager is a product by Google. Please notice that we can only support our Google Ad Manager Integration and not help with settings within your actual GAM account.
If the manually placed ad unit is showing up then please check out the general issues for ads not showing up and reach out to our support if that doesn’t help.
What else you need to know
You might run into conflicts when using the traditional, manual method of implementing head and body tags from Google Ad Manager with our Google Ad Manager integration at the same time. The most common issue is using the same ad units in both methods.
Our Google Ad Manager plugin uses inline tags, which don’t need matching head and body codes and is therefore flexible when it comes to delivering different ad units to different users. If you are depending on using the Roadblock or SingleRequest options for Google Ad Manager then use the manual setup for Ad Manager tags as described here.
We store all relevant ad unit information with the ad created in Advanced Ads. This keeps the ad working even when you connect your site with a different Google Ad Manager account or disconnect it completely.
The ad container ID created by Advanced Ads is different from the one in the GAM account and changes with each page reload if your site is not cached. This is due to this information missing in the GAM API and has no impact on the functionality of the ad. We are following the same format though, e.g.,
On AMP pages, the ad codes are generated with multi-size validation disabled. This means that all sizes defined for the ad unit in your Google Ad Manager account will show up on AMP as well.
The add-on can connect to your Google Ad Manager account whether your site uses HTTP or HTTPS, though we highly encourage using the latter.
The Ad Manager plugin does not place any addition codes to your site, e.g., in the header. Only the codes needed for the placed ad units is inserted.