javascriptgoogle-dfpdouble-click-advertising

How can I display a specific ad from an ad_unit using Google DFP?


Our website is using Google DFP to display custom ads on specific pages.

Our DFP setup is simple:

Everything is working great thus far. Each ad unit on the website is showing ads at 'random' based on the available views and such.

In some specific cases, it is required to force a specific ad from an ad unit for displaying. However I am unable to find any documentation on how to accomplish this. I could really use some help.

I know the most obvious solution would be to create a new ad unit and put a single ad in there, but this is not desired as this would mean each ad (100+) would need it's own ad unit.

So in short, how do I tell Google DFP to display a specific ad from a specific ad unit?

Thanks for any assistance!


Solution

  • Go into DFP and create a new line item and associated it with the Ad creative you want to see, next create an AdUnit that matches a key/value of your choosing. Make sure that AdUnit has priority over the others. Let say category=sports.

    The when you create the Ad slot in GPT pass those values in the targeting. see Setting Targeting and Sizes