How to Generate Ad Tags in DFP?

Picking out an ad server can be a huge decision, especially if a website makes a significant portion of its earnings from display ads. Publishers look for ad servers that are easy to use, delivers fast ad loads and offer flexibility for both direct and remnant ad inventories. DoubleClick for Publishers (DFP) is one such ad server. It is one of the most popular ad serving platforms out there and provides a huge advantage of maximizing revenues from AdSense ads. Beginners can find it a little difficult to get used to the feature-rich interface of DFP. We, at Blognife, seek to solve this problem of new publishers.

In this tutorial, we are going to learn how to generate ad tags in DFP. For those who are completely new to DFP, let me tell you that an ad tag is a piece of code that is to be inserted into the source code of a particular page on your website and it represents the position at which the ad will be showcased. It also contains data on the size of the ad, whether the ad requests are synchronous or asynchronous, key values etc, which we will discuss later.   

Let’s take a closer look at how ad tags are generated in DFP.

How to Generate Ad Tags in DFP?


There are two ways to go about this first step. We will go through both of those in details.

(a) First login to your DFP account, go to the Inventory tab and after the ad units get loaded, click on the Generate tags tab on the left. Then choose the ad unit for which you want to generate ad tags by clicking on include and now click on the Generate tags tab below.


(b) Instead of following step (a), first, click on the ad unit for which you want to generate the ad tags. Then click on the Generate tags tab on the bottom right corner.


Now select the tag type for your ad tags and once you have selected a type, click on continue.


Now it is your turn to select the tag options. Please note that the Enable single request option is enabled out of default and the others are disabled out of default.

The Enable single request ad tag requests for all the ads on the page at once rather than requesting for each one separately. This results in much better page load time and improved site speed. But this may also cause inconsistent reporting problems.

The Enable synchronous request tag enables ads to load on the page synchronously with site content. Site speed is slowed down due to this but the ads and content load simultaneously.

Passback tags are tags that are trafficked through a third-party ad server and not placed directly on the page.

Collapse empty divs will collapse the empty divs when certain ad slots are not filled.

Page level targeting and inventory unit level targeting are for adding key values.  

Once you have checked and unchecked tag options and entered key values, click on Continue below.


The tag results are now generated. Copy and paste the two pieces of code under Document Header and Document Body into a text file on your computer and save it.


Now you have to insert the code into the source code of your page. Remember to place the Document Header code between the <head> tags and the Document Body tags wherever you want the ads throughout your site.

Thus your ad tags are generated. DFP is crucial for publishers who want to monetize their ad revenue and have in-house or direct advertiser relationships. So, getting properly accustomed to DFP is very important. This is a part of that process. We hope this article has been helpful in your understanding of DFP and will enable you in generating the ad tags.

Our optimization strategies have helped publishers increase more than 30% of their ad revenue. You have no idea of how much money you're losing right now! You can increase your display, video, and native ad revenue by booking a consultation with me. This limited time $300 consultation would include suggestions on how you can increase your overall website revenue. You will be getting revenue upliftment guides-- that can help you setup video ads which pays CPMs of USD 10 and above for tier 1 traffic and USD 3 and above for tier 2 traffic. Also enabling auto-refresh ad units (took me hours getting the code ready but it generates great additional revenue), tips on using DFP to maximize revenue, and more. All these information would worth $3000 and above if you're going to learn by doing it yourself, plus there is a significant time cost involved as well. These steps, if implemented will guarantee least additional 30-50% revenue uplift on your blog or website. Since the slots are limited and I offer a one to one consultation, please book your preferred slot here. Do connect with me on my skype id:ronniedey. Looking forward to our 1-on-1 discussion to help assist in increasing your ad revenue.

Works as an ad optimization specialist helping publishers increase their ad revenue in display, video, native, and high impact ad formats. You can contact him on skype (skype id: ronniedey) to increase your ad revenue immediately or hire him for a consultation. If you're an ad network owner, do get in touch for sponsored reviews.

We will be happy to hear your thoughts

Leave a reply

%d bloggers like this: