To me, there is no doubt that Google DoubleClick for Publishers (DFP) is the best, free ad server you can get started with. It seems like more and more publishers know that and I am sure some of you learned from it through my articles or support. However, there are a couple of problems one regularely runs into. One of it is that DFP obviously counts more ad impressions than there are measured by tools like Google Analytics.
In this tutorial you are going to learn
- what the single-request mode is
- why DFP counts too many impressions
- how to fix impression counting
To understand the underlying problem of wrong impressions in DFP, you need to learn more about the single-request mode.
Imagine your site has 3 ad units (= placements for ads). With most ad networks, you get 3 different ad tags and each of them requests the ad for the correct position individually.
The single-request mode in DFP now combines all ad requests into one. The request is fired with the first ad tag in the body of your page.
How does DoubleClick know in advanced which ads are included in the request before all ad tags where called? If you used DFP before you probably noticed that all the ads for a specific page are already defined in the header, the invisible part of your website. In single request mode these information are send to the DFP server to request the content of all the defined ads.
Btw, you know if you are using the single-request mode, if you find this line within your header ad code:
Code language: CSS (css)
What happens if you switch off single-request mode?
If you switch off single-request mode each ad unit is requested individually.
This itself should not cause you problems. I also never experienced a problem with the performance of the websites.
However, just for the sake of completeness, one feature is indeed not working well without single-request mode: roadblocks.
Roadblocks are a feature in DFP that allows advertisers to deliver multiple creatives from the same line item. This way you can sell the whole page impressions to the same client. Or put it another way: you can serve ads from the same client on every ad unit of the same page impression.
However, even though this is known and sometimes booked, most publishers would probably never have such a request from an advertiser anyway.
How DFP counts impressions (wrong)
Understanding the single-request mode you now probably already have an idea why the impression counting might be wrong. With enabled single-request mode the impression is counted not when the ad unit is called in the body (= the visible part of your website), but when requested in the header.
This is a big problem especially, if you defined ad units in your header that are actually not displayed later on your site. This often happens if there are different ad units defined for specific categories on your page or if the layout changes.
E.g. you might want to display an ad unit within the content of your posts, but on some category pages or static pages you might not want to do this, but since there is very few flexibility about this in most content management systems, you would still define the post content ad unit in the common header of every page.
How to fix impression counting
The solution is simple and recommended in most ressources: remove the single-request mode by removing the following line from your header ad tags.
Code language: CSS (css)
I would also recommend to not load all ad units in your sites header, but only those you are actually going to display. The solution to this is not very simple if you are not very familiar with the different types of ad tags in DFP, but if you need help, you can ask us for a quote.
There is not a lot more to say, but you can find sone additional information about this issue in the Google DFP manual: