Google DFP, or DoubleClick for Publishers is a free ad server from Google that lets you sell ad space on your website more effectively and also helps maximize your advertising revenue.

With DFP, you may run standard banner ads, text ads (JavaScript based) or even rich-media campaigns that use video and Flash creatives. The tool, which was formerly known as Google Ad Manager, requires no downloads or installation and any website publisher can sign-up for the DFP program as long as they have an active Google AdSense account.




Step 1: Create Ad Units
We need to tell DFP about all the advertising spaces on our web pages. For this example, we’ll create three ad units – the 300×250 rectangle, the 160×600 skyscraper and the 468×60 banner. These are standard IAB units though you can define custom ad sizes as well.
Go to DFP –> Inventory –> Ad Units –> New Ad Unit (choose Web or Mobile). Give your ad unit a descriptive name so that you can easily determine where that ad unit will be displayed and also include the size of that unit. You may check the option “Maximize revenue of unsold and remnant inventory with AdSense” in case you wish to display Google Ads when there are no direct ads or when Google is offering better CPM than the direct advertiser.
Step 2: Define Placements

You have multiple ad units on the website and there’s a possibility that an advertiser may want to target one or more of these ad units. For instance, an advertiser may want to target your Medium Rectangle and Skyscraper ad units on tech-related pages of the site. You can group these ad units into a placement that can be targeted by advertisers.
Go to the Inventory tab –> Placements –> New Placement and add your placement. To keep things simple, we will associate only one ad unit (300×250) with our ad placement. Check the option that says “Offer this placement to advertisers” through AdWords to attract more advertisers. You should carefully fill the AdSense targeting section for that placement since whatever you write here will be viewable by AdWords advertisers.
Step 3. Create an Order

Now that we have defined our ad inventory, it’s time to create the client’s order (or campaign). The client /advertiser will specify where he wants to place the ad, what kind of demographics he wants to target, what’s the price he is willing to pay and how long will the campaign run on the website.
Go to DFP –> Orders –> New Order. Create a company for the advertiser and then fill-in the order details under “New Line Item.” Set the Type to “Price Priority” if you want the highest paying ads to be served on your site. Set Value CPM equal to the price that the client will pay and then add the targeting criteria.
Step 4. Upload the Ad Creative

Next you have to upload the ad creative that will display on your web pages. You can either upload images, Flash videos or even snippets of HTML and JavaScript in case you’re going with text ads.
Go to DFP – > Line Items and select the “Line Item” that you’ve created in the previous step. Click Add Creatives and either upload the image / SWF Flash file or choose the Text Ad format to enter a text-on ad (like the one you see on Google search pages).
You can even upload multiple creative ads per line item and they’ll display evenly across the site – you can compare the click-through rates of these creatives to determine the ad copy that performs best with your visitors.
Step 5. Get the Ad Tags for your Site
We’ll grab the JavaScript code from DFP and copy-paste it into our website /blog template.
Click the Inventory tab in your DFP dashboard and choose “Generate Tags” – select the appropriate ad unit (the one you created in Step #1) and choose “Generate Tags.”   Use the Google Publisher Tag (asynchronous) option from the drop-down and add this code to your website. Google DFP should begin serving ads on your pages in the next 10-15 minutes.