Google Ad Manager Setup For Blogs & Affiliate Networks

11 Mins read

Actually, this will be something of a tutorial on how a site using Affiliate Networks as the main source of revenue and other advertising sources to round things off can set up Google Ad Manager to ensure the Affiliate ads are given the highest priority. I also have a few tips on how ads can be controlled on your site under this setup. Some of this information may be more valid for sites with less than 1000 visitors a day when conventional ads networks are not going to generate much revenue, but it should be a good walkthrough for anyone getting ready to use Google Ad Manager.


I started using Google Ad Manager to keep track of the start and stop times for special offers and other time sensitive ads from the Affiliate Networks I use. It is a very powerful tool for that and many other options you might want to apply to your advertising campaigns, even better, it is free. However, what I found when I had Google Ad Manager setup the way it probably should be for high traffic sites is that my ‘House’ ads, the Affiliate Networks I wanted to be given the highest priority and had them set with higher CPM and vCPM values for that reason, were consistently losing the Ad Slot to AdSense ads (turned on in the Ad Slot settings). I also tried to setup AdSense ads to run as an ‘Ad Network’, but this gave similar results, so obviously ‘House’ orders are given a lower overall priority regardless of what CPM value is assigned. Here is what I came up with to deal with that, and it seems to work well.

First you will need to plan out the Ad Zones for your site, how this is done from a technical standpoint will vary depending on how your website is built, but in the end you will need to insert code into the header and where you want the ads to display, so prepare your website and plan where the ads will go – if this has not been done already.

For WordPress users a Google Ad Manager WordPress Plugin exists, but unless you simply are not comfortable editing your theme files, here is what I believe to be a better option… I use the Advertising Manager WordPress Plugin to give me some additional control of the Ad Zones from the WordPress Dashboard. This still required editing the proper theme files and some work in the sidebar to insert the plugin code, so it is an optional step really (I prefer to hand input the code into a text widget, but the Advertising Manager WordPress Plugin does provide sidebar widgets). More on this later, let’s get to setting up Google Ad Manager.


Now that you have defined Ad Zones for your site, log in to Google Ad Manager and lets set up your Inventory, or Ad Slots and Placements (you can get real creative here, but in a simple setup each Ad Slot will need a Placement – the tutorials for Ad Manager cover this pretty well). If new to this it might work best to give the Ad Slots and Placements the same name and have this also be the name of the Ad Zone on your website. Make sure when you setup the Ad Slots that you uncheck “Use network-specified defaults for AdSense settings” and “Maximize revenue of unsold and remnant inventory with AdSense” to disable AdSense settings, I will show you how to get AdSense (or any other ad source) working later. Another thing to note at this point is that once setup, you will not really interact with the Ad Slots, and your actual ads (called orders) will go into Placements. Go to Inventory >> Ad Slots >> New Ad Slot and setup your required Ad Slots.

With the Ad Slots defined, here is where we need to generate the code you must insert into your website for this whole thing to work. Go to Inventory >> Generate Sample HTML, now select (add) each Ad Slot for your site (all of them, unless you created Ad Slots for multiple sites) and click Generate Sample HTML. You will end up with 2 sections of code, one that must be inserted into the header and another that includes code for each Ad Slot. Insert this code into the appropriate spots in your website code now.


For WordPress users the header is almost always going to be a theme file called, oddly enough, header.php, which can be edited from the dashboard under Appearance >> Editor. Editing the various theme files to insert the ad code into the different types of pages is up to you since it will depend on your specific configuration and theme. If you are not comfortable doing that, you might be better off simply inserting the Ad Slot code into sidebar widgets or using the Google Ad Manager WordPress Plugin, as discussed above. If you selected my option of using the Advertising Manager WordPress Plugin and have already inserted the required code into your theme files, then you can simply create ‘ads’ with the Advertising Manager WordPress Plugin to represent each Ad Zone on your site and insert the Ad Slot code into those ‘ads’. Doing this using the Advertising Manager WordPress Plugin allows you to easily turn on or off control of the ads by Google Ad Manager and provides other adoptions locally. Regardless of which way you insert the Ad Slot code you will still need to edit the header file, though, or nothing is going to work (I think the Google Ad Manager WordPress Plugin handles this, but I have also heard some people have problems with this plugin altering the code of AdSense ads, causing Google to suspend ads on the related AdSense account – I do not use the Google Ad Manager WordPress Plugin myself so I cannot say if that is true or if another problem existed).

ads manager

Now you must create Placements for your Ad Slots, as stated above it might be easiest to give the Placements the same name as the Ad Zone on your website because that is what they represent in this fairly simple setup. Go to Inventory >> Placements >> New Placement and setup your required Placements. Once the Placements are the setup you must assign each Ad Slot to a Placement (or each Placement to an Ad Slot, whichever you prefer), you might have noticed the Ad Slot can be assigned as you setup each Placement as well. Again, you can deal with complex setups here, but in this simple setup each Ad Zone on your website is represented by an Ad Slot in Google Ad Manager, in turn, each Ad Slot is assigned to a Placement and the actual ads (orders) are assigned a Placement to determine which Ad Slot and ultimately, which Ad Zone the ads will appear in.

OK, up to this point this has been a standard setup for Google Ad Manager, but here is where we start to do things a little different. It is now time to setup your Companies, these are really going to be your Advertising Sources, such as Google AdSense or Commission Junction. Companies are set up under Admin, so go to Admin >> Companies >> New Company and set up a Company for each source of ads that you have (I guess you could also just make one Company and assign all your orders to that Company, whatever works for you). IMPORTANT! Setup each Company as an Advertiser, no matter what kind of ad source it actually is, this will make sense later, especially if you do it wrong now…

That was easy enough, now comes the next part, setting up the actual ads. Ads, actually called Orders, are set up in a 3 step process. The first of these steps is to create an Order, for simplicity, this will also be given the same name as the ad source since it will contain all the individual ads from this ad source as Line Items. Go to Orders >> New Order (do not use New Network Ad Order) and create an Order for each of your ad sources. Set the Billable Party to Advertiser and then select the Advertiser (actually this will be the Companies we setup earlier) from the drop down list (if you failed to set each Company as an Advertiser they will not show in this list). You will also probably want to set the end date to Unlimited unless you have a known date that you intend to stop using this ad source (individual ads will be entered later and can have the independent start and stop times).

Now we can insert an actual ad into one of the Orders. Click the order you want to insert an ad into, and then click New Line Item. You will want to give the Line Items a name that explains what the ad is and where it displays, to make it easier to work with them later. IMPORTANT! This is the first spot where you decide what priority the ad will have. Always select House as the Delivery Priority for your Ad Network ads and Remnant as the Delivery Priority for your Affiliate Network ads, at least for now. You can get fancy with other Delivery Priority types once you are comfortable with how Google Ad Manager will serve ads when other settings are used. As a general rule, other than special ad programs, you will only use House or Remnant. Ad priority appears to be assigned in this manner when using Google Ad Manager:

House – Lowest Priority (use for Ad Networks and other “fill ads”)
Remnant – Higher Priority (most of your ads will go here – ads do not need to have an end date)
Standard and Premium – Even Higher Priority (special ad campaigns – ads must have an end date)
Exclusive – Highest Priority (seems obvious how this will work)

The next factor in ad priority is going to be the CPM value you enter… Set all ads to CPM for now, regardless of the actual ad type, you can change this later if you want. A bit of planning is required when entering the CPM value as you create Line Items… As an example, say I have 3 Affiliate ads I want to be my primary offers and give them all a CPM of 1.00, that way they have equal priority and should display in near equal amounts. Additionally, in that same Placement, I also want to have an Ad Network show if all my offers are expired (or for other reasons I will explain below), so I give that Line Item a CPM of 0.50. This might not actually prevent the Ad Network ad from ever showing, but it will show much less often than the Affiliate Networks ads with a CPM of 1.00 in the next higher Delivery Priority category. It is also important to set all the ads in any given ad slot that you want to be in ‘regular rotation’ with the same CPM value, setting any ad with a lower CPM value is going to prevent it from showing much, if at all… I will explain how to better control ad rotation by using a Per User Frequency Cap later. Got a general idea? Good. If not, go ahead and ask a question, I will answer them the best I can.


The final step in entering an ad is to insert the code for the individual Creative’s (HTML for the ad Image and Link). In most cases you are going to want to select Rich Media as the Creative Type, this will open a code box that you can paste the code from your ad source into. When you insert the code for AdSense ads in this manner you will get this warning: “Ad Manager supports AdSense per Ad Slot and pasting this AdSense snippet here will not yield desired results.”, ignore it, the ads will still work just fine. Well, that about covers the initial setup and if everything was entered correctly you should be displaying ads once the settings take effect (up to an hour), so let’s move on to some tips and tricks of this type of configuration…

You can run your ads in a specific order by enabling the Per User Frequency Cap when setting up your Line items. Let me explain… Let’s assume the average user at a site loads 3 pages, then leaves. This means I want to display my best offers in the first page views and drill down from there. If I was to set the CPM and Delivery Priority for these ‘prime’ ads higher than any other ad in my Inventory, they would be the most likely ad to display first. If I also set the Per User Frequency Cap on these ads to 1 time per hour (again assuming this visitor will load a few pages per visit), these ads would only display 1 time to this visitor during this visit and would then be out of the competition for that Ad Slot. By doing a little planning when I set up my Line Items and Per User Frequency Caps, I can display my ads in a defined order. This is a very powerful option and can be used to create complex ad rotation if done correctly. Finally, let’s say I do have 3 offers that use the Ad Slot in question, by setting the Delivery Priority, CPM and Per User Frequency Cap correctly I should be able to offer all 3 of them in the first 3 page loads, but what if this user loads 5 pages… That’s right, now that the prime ads have been displayed and no longer compete for the Ad Slot, the Ad Network ad takes over and fills the Ad Slot for any additional page loads.

You might ask why a site with low traffic would even want to run ads on an Ad Network, and that is a valid question. The first reason would be to cover Ad Slots when no other offer is using them, here is another reason you might want to back up your Affiliate Ads with other ad sources. Many Affiliates will only pay for sales made in the United States, when you set up a Line Item in Google Ad Manager you can apply Targeting, so for all my Affiliate Network ads I target only the countries that they would be valid in, the Ad Network Line Item, on the other hand, is not set that way so it will automatically display in countries where the Affiliate offer is not valid since it has no competition. Sure, this might not make you rich, but a penny saved is a penny earned and it makes more sense than displaying no ad at all, or one that cannot even be used.

google ad

You may also sell ads directly from your site or have other reasons for an ad to have exclusive use of an Ad Slot, such as Cost Per Day/Week/Month campaigns. Google Ad Manager provides an option for that when setting up the Line Item for these campaigns (called Exclusive). Alternately you could simply pause the competing Line Items for the duration of the exclusive campaign. You can also get much more impressions of this ad compared to others in the same Ad Slot by setting the Delivery Priority, CPM and Per User Frequency Cap for ads in the same Ad Slot properly. As you get comfortable with Google Ad Manager you can experiment with all these settings on the fly, even for an active Order, by pausing the related Line Item.

I cannot really see Google Ad Manager being able to accurately track your earnings in any configuration unless you are diligently entering and updating precise pricing data perhaps, but it certainly isn’t going to work well in an Affiliate Network environment. Considering that, what do you really gain by entering the proper CPC information for those campaigns, unless they all come from one source may be. But you certainly can enter that data and still get this configuration to work by also entering a figure under Value CPM for those items, this will allow you to track earnings for that Line Item, while still giving the Line Item the desired priority related to the CPM Value.

Having Trouble? Things not doing what you expected? Keep in mind a delay exists before many new settings take effect, you may need to wait up to an hour before testing your setup, to be sure all the settings have taken. If you are still not getting the expected results, a debug tool exists that will give you information about why a certain ad was (or wasn’t) displayed in any given Ad Slot. To use that tool you would add the code?

875 posts

About author
Falls down a lot. Extreme beer maven. Coffee trailblazer. Hardcore twitter geek. Typical zombie fanatic. Skydiver, foodie, band member, International Swiss style practitioner and front-end developer. Producing at the nexus of aesthetics and intellectual purity to craft an inspiring, compelling and authentic brand narrative. Let's chat.
Related posts

What Is A Tag in WordPress and how to add them

4 Mins read
Tags in WordPress are a way to group your content on a website, and it will be very helpful if you plan…

Wordpress is the fastest-growing content management system.

4 Mins read
WordPress is the fastest-growing content management system in the world, with more than 25 million websites hosted on it. It’s easy to…

Top nine Reasons Why You Should Build Your Website On WordPress

4 Mins read
Whether you are definitely getting your enterprise began, and you’re nonetheless getting to know a way to improve your online presence or…