How to Implement Custom Targeting Within DFP

Custom targeting is a useful tool to enable targeting of specific types of pages without having to build a ridiculous amount of ad units. It is necessary for having great targeting capability while having a lean DFP setup.

Related Read: DFP Cheat Sheet for Beginners: Targeting Line Items

Below are the directions for setting up custom targeting:

Step 1: Log into DFP

Step 2: Click the Inventory tab

DFP Custom Targeting Inventory

Step 3: Click Custom Targeting

DFP Custom Targeting

Step 4: Click New Key and name it — this is the title of segmentation variable (eg. category, demographic)

DFP Custom Targeting New Key

Step 5: List each variable (one per line)

DFP Custom Targeting Ad Variables
Now that you have set it up on DFP, it’s time to implement it within your site. As an example, this is how the strings would read on the home page from affiliate1 traffic:

googletag.pubads().set(‘page_url’, ‘’);
googletag.pubads().setTargeting(‘publisher’, ‘affiliate1’);:

Each variable should be placed on the relevant page. When you target a custom variable when creating a line item, it will show up on the relevant pages that have that variable. For reference, here is a publisher that has custom targeting set up: view-source:

If you’d like to learn how MonetizeMore can implement custom targeting for your DFP account, contact us here for a free consultation.

Related Reads:

Kean Graham

CEO and Founder at MonetizeMore

Kean has been a pioneer in the AdTech world since 2010 who believes in the supremacy of direct publisher deals, programmatic advertising, and building ad technology as keys to scaling ad revenue. Here, he provides publisher resources and guides covering areas like website monetization, AdSense optimization, Google Ad Manager, Ad Exchanges, and much more.

Get our latest ad optimization tips delivered to your inbox

Fill out my online form.

Submit a Comment

Your email address will not be published.