To add Google Ad Manager ads to WordPress, you create ad units in Google Ad Manager, then place them on your site, either by pasting header and body tags into your theme or, without code, by connecting a plugin that imports your ad units and places them from the WordPress dashboard.
Google Ad Manager doesnât put ads on your WordPress site for you. It gives you ad tags, and you have to get those tags to the right spot on the right pages. Done by hand, that means copying code, matching header and body tags and fixing blank slots. Done with a plugin, it takes a few clicks. This guide shows both ways, with the no-code method first, plus how to set placements and what to do when ads donât show.
What do you need before you start?
- A Google Ad Manager account (with Ad Exchange if you use AdX).
- WordPress admin access to your site.
- At least one ad unit created in Google Ad Manager. The plugin imports units, so they must exist first.
- For the plugin method described below: WordPress 6.0 or later, PHP 8.0 or later and a GAM account.
Step 1: How do you create an ad unit in Google Ad Manager?
Googleâs own steps:- Sign in to Google Ad Manager.
- Click Inventory, then Ad units.
- Click New ad unit.
- Enter a name. Including the adâs location in the name helps you find it later.
- Enter a code. It identifies the ad unit in its tag. If you leave it blank, it defaults to the name.
- Choose the sizes. For a fixed-size ad, tick each size you expect to serve. Add the Out-of-page size for pop-ups, floating ads and interstitials, and the Fluid size for native ads.
- Click Save.
Step 2: How do you add Google Ad Manager ads to WordPress without code?
A plugin does the placement work. Hereâs how it works with GAM Ad Inserter:- Install the plugin. Go to Plugins > Add New and search for it, or upload the ZIP file with Plugins > Add New > Upload Plugin, then activate it.
- Connect Google Ad Manager. Open the plugin settings and click the connect option. Sign in with the Google account linked to your GAM network, paste the authorization code and save. When the connection works, the settings page shows âConnected to Google Ad Manager.â
- Import your ad units. The plugin pulls your ad units from GAM so you can pick them from a dropdown instead of pasting code.
- Create an ad. Choose the ad unit, the format and whether it should be responsive so it adjusts to the screen.
- Set the placement. Choose where it appears: above or below content, in a sidebar or as a sticky unit, and the alignment (left, right or center).
- Limit where it shows. Run it across the site or only on chosen posts, pages or categories.
- Turn it on and check. Use the Manage Ads section to enable the ad, then open a page on your site in a private window to confirm it appears.
Whatâs the manual way to add Google Ad Manager ads to WordPress?
If you prefer code, the manual method works too, but it has more steps and more ways to go wrong:- Create the ad unit in Google Ad Manager and generate its tag. Each tag has two parts: a header tag and a body tag.
- Paste the header tag into your pageâs <head>.
- Paste the body tag exactly where the ad should appear.
- If several ads share a page, merge their header code into one script by hand.
- Check the page. Keep each header and body tag paired, and limit each ad to the pages where it belongs.
- A header without a body shows nothing, and a body without a header wonât display.
- A header on a page that doesnât need it can still count an impression, which skews your Ad Manager reports.
- Several ads on one page mean combining header code by hand.
- Every new ad means repeating the process.
Manual method vs plugin: which should you use?
| Manual code | Plugin (no code) | |
| Setup | Copy and paste tags for every ad | Connect once, then pick ad units |
| Skill needed | Comfortable editing theme or header code | Dashboard clicks only |
| Placement changes | Edit code again | Change in settings |
| Risk of tag mismatch | Higher | Lower |
| Best for | One or two fixed ads | Several ads, frequent changes |
Where should you place your ads?
GAM Ad Inserter gives you placement control from your WordPress dashboard without editing theme files:- Posts, pages, and widgets: add ads to your content, widget areas, or predefined site-wide placements.
- Ad Position: choose where the ad appears on the page.
- Ad Alignment: choose how the ad lines up in its space.
- Entire Site or Specific Pages: show the ad everywhere, or only on selected posts, pages, or categories.
- Devices: show the ad on desktop, tablet, mobile, or all three.
- Responsive sizes: turn on responsive sizing so ads adjust to each screen, or use fixed sizes per device.
- Place ads where people are reading, not at the very bottom.
- On mobile, make sure anchor and sticky ads donât cover content or buttons.
- Sidebars work best on desktop layouts.
- Donât overload the page. Too many ads hurt speed, user experience, and ad performance.
Why arenât your Google Ad Manager ads showing in WordPress?
Work through these in order:- New ad units take time. A newly created ad can take up to 30 minutes to process in Google Ad Manager.
- The unit isnât approved or trafficked. Check that an ad is actually set up to serve in Ad Manager.
- Caching. A page cache can save a snapshot with an empty slot, so every visitor sees blank space. Exclude those pages from caching or load ads in the browser after the page loads, then purge the cache.
- Ad blockers. Test with them off.
- Placement or targeting rules. Make sure the page, device and category settings match where you expect the ad.
- Modified JS tags. In manual setup, the plugin reads the ad unit and size from the tag you paste. If the tag was edited after copying it from Google Ad Manager (a changed div ID, removed lines, wrong sizes, or the GPT script added twice), the ad can fail to load or show blank. Copy a fresh tag from Ad Manager and paste it exactly as generated.
- The ad unit isnât in the dropdown. The unit may not exist in GAM, or the connected account or network may not have access to it. Check youâre connected to the right account.
Add Google Ad Manager Ads Once, Manage Them From Your Dashboard
You can add Google Ad Manager (GAM) ads to WordPress by hand, but every new ad means more code and more chances for a mismatch. A plugin lets you connect once, import your ad units and control placement, devices and pages from one screen. Create your ad units in Ad Manager first, connect your account, set your placements and test in a private window.FAQs
-
Can I add Google Ad Manager ads to WordPress without code?
Yes. A plugin that connects to your Ad Manager account and imports your ad units lets you place ads from the dashboard.
-
Do I need a Google Ad Manager account first?
Yes. Without one you canât import or manage ad units.
-
Do I need to create ad units in Google Ad Manager before using the plugin?
Yes. Create them in Ad Manager first, then select them in the plugin.
-
Can I show ads on specific pages only?
Yes. You can run ads site-wide or limit them to selected posts, pages or categories.
-
Can I make ads responsive?
Yes. Enable the responsive option when you create the ad so it adjusts to each screen size.
-
Does it work with Google Ad Manager 360?
Add Google Ad Manager Ads Once, Manage Them From Your Dashboard
You can add Google Ad Manager (GAM) ads to WordPress by hand, but every new ad means more code and more chances for a mismatch. A plugin lets you connect once, import your ad units and control placement, devices and pages from one screen. Create your ad units in Ad Manager first, connect your account, set your placements and test in a private window.
If youâre not making the most of your ad space, youâre leaving money on the table. MagicBid helps web, app, and CTV publishers maximize revenue with smarter ad placement and optimization tools.
-
Web Monetization:Â Get better ad visibility, higher engagement, and more revenue from every impression.
-
In-App Monetization:Â Connect with premium advertisers to effortlessly boost fill rates and eCPMs.
-
CTV Monetization:Â Deliver high-quality, tailored ad experiences that keep viewers engaged and advertisers paying more.
With MagicBidâs advanced ad tech and expert support, you can turn your traffic into higher earnings without the guesswork. Connect with us now to get a free ad revenue evaluation.