Key Points

  • Prebid targeting allows publishers to define specific criteria for ad requests, ensuring the right ads reach the right audience at the right time. This can lead to higher bid prices and increased revenue. 
  • Key targeting parameters in Prebid include user-based targeting, page-level targeting, ad unit targeting, device and browser targeting, and geographic targeting. These can be implemented in both Prebid.js and Prebid Server setups.
  • Proper testing and ongoing optimization are crucial for effective Prebid targeting. 
  • Common challenges in Prebid targeting include low match rates, privacy compliance, troubleshooting targeting issues, and maintaining effectiveness in a cookieless future. 

Prebid is a cornerstone of programmatic advertising, offering publishers a way to level the playing field and get the best value for their ad space. 

But to truly unlock its potential, you need to master Prebid targeting. 

What exactly is Prebid targeting, and why should you care? 

Simply put, it's the secret sauce that ensures the right ads reach the right audience at the right time. This precision can lead to higher bid prices and, ultimately, more revenue in your pocket.

What Is Prebid Targeting?

In the Prebid context, targeting refers to the process of defining and applying specific criteria to ad requests. These criteria help determine which ads are eligible to be shown to a particular user in a given context. 

But how does Prebid targeting differ from standard header bidding targeting? It all has to do with its granularity and flexibility. While traditional header bidding might offer basic targeting options, Prebid takes it to the next level with a wide array of targeting parameters that can be fine-tuned to your specific needs. 

Here's where it gets exciting for publishers:

  • Increased Revenue Potential: By allowing advertisers to bid on highly specific audience segments, you're likely to see higher CPMs for your inventory.
  • Better User Experience: More relevant ads mean happier users, potentially leading to increased engagement and retention.
  • Greater Control: Prebid gives you the reins, allowing you to set targeting rules that align with your site's content and audience.
  • Improved Advertiser Relationships: By offering more precise targeting, you become a more valuable partner to advertisers, potentially leading to more direct deals.

All in all, Prebid targeting allows publishers to create a more competitive and efficient auction environment for their ad inventory. This not only helps maximize revenue but also enhances the overall advertising ecosystem by delivering more relevant ads to users.

 

Header Bidding Pillar

Read Now: The Complete Guide to Header Bidding

Key Targeting Parameters in Prebid

With Prebid, you can take advantage of a rich set of targeting parameters and fine-tune how your ad inventory is sold. 

Let's explore some of the most powerful options available in both Prebid.js and Prebid Server:

User-Based Targeting with Prebid User ID Module

User-based targeting leverages user data to serve more relevant ads. This can be set up using Prebid's User ID module. 

For Prebid.js:

pbjs.enableAnalytics({
pbjs.setConfig({
    userSync: {
        userIds: [{
            name: "pubCommonId",
            storage: {
                type: "cookie",
                name: "_pubcid",
                expires: 365
            }
        }]
    }
});

This example configuration sets up a first-party cookie to store a unique user ID, which can be used across multiple ad requests to improve targeting accuracy. You can adjust the expiration time based on your needs and privacy policies. 

For Prebid Server, user-based targeting is typically configured in the server-side setup. Here's an example of how you might include user ID information in a bid request in that case:

pbjs.enableAnalytics({
{
  "user": {
	"ext": {
  	"eids": [{
    	"source": "pubcid.org",
    	"uids": [{
      	"id": "sample-userid",
      	"atype": 1
    	}]
  	}]
	}
  }
}

Page-Level Targeting in Prebid

Page-level targeting uses information about the content on a given page to match appropriate ads, including factors like content category, keywords, or URL. So, for example, if you’re looking at a page about off-road vehicles, page-level targeting would help you make sure the ads served focus on similar topics.

For Prebid.js:

pbjs.enableAnalytics({
pbjs.setTargeting('category', 'sports');
pbjs.setTargeting('keywords', ['football', 'nfl', 'superbowl']);

This example sets targeting parameters for the page category and relevant keywords. These parameters can help advertisers bid more accurately on inventory that matches their campaign goals. You can customize these parameters based on your content.

For Prebid Server, you'd include this information in your bid request:

pbjs.enableAnalytics({
{
  "site": {
	"page": "https://example.com/sports/nfl",
	"content": {
  	"category": ["sports", "football"]
	}
  }
}

Ad Unit Targeting Specific to Prebid Configurations

Ad unit targeting allows you to set specific parameters for individual ad slots on your page. For example, if ads in different positions should have different sizes or dimensions to align with your page layout, you could set that up with ad unit targeting.

For Prebid.js:

pbjs.enableAnalytics({
pbjs.addAdUnits([{
	code: 'div-gpt-ad-1460505748561-0',
	mediaTypes: {
    	banner: { sizes: [[300, 250], [300, 600]] }
	},
	bids: [{
    	bidder: 'appnexus',
    	params: { placementId: 13144370 }
	}],
	targeting: {
    	'position': 'sidebar',
    	'visibility': 'high'
	}
}]);

This configuration sets up an ad unit with specific targeting parameters. It defines the ad sizes, specifies a bidder, and sets custom targeting parameters for the ad unit's position and visibility. You can adjust the sizes, bidders, and targeting parameters to match your needs.


Spelling Bee Solver Case Study

Read the full case study now

For Prebid Server, you'd include similar information in your bid request for each impression object:

pbjs.enableAnalytics({
{
  "imp": [{
	"id": "div-gpt-ad-1460505748561-0",
	"banner": {
  	"format": [
    	{ "w": 300, "h": 250 },
    	{ "w": 300, "h": 600 }
  	]
	},
	"ext": {
  	"prebid": {
    	"targeting": {
      	"position": "sidebar",
      	"visibility": "high"
    	}
  	}
	}
  }]
}

Device and Browser Targeting in Prebid

This type of targeting allows you to tailor ads based on the user's device type, operating system, or browser. 

For Prebid.js:

pbjs.enableAnalytics({
pbjs.setConfig({
	deviceAccess: true,
	userSync: {
    	filterSettings: {
        	all: {
            	bidders: '*',
            	filter: 'include'
        	}
    	}
	}
});

This example configuration enables device access and user syncing across all bidders, allowing for more accurate device-based targeting. You can adjust these settings to fit your targeting strategy. However, be aware that this may have privacy implications and should be implemented in compliance with relevant regulations. 

For Prebid Server, device information is typically included automatically in the bid request based on the user's device. The server-side implementation handles this aspect differently from the client-side approach.

Geographic Targeting Implementation in Prebid

Geographic targeting allows you to serve location-specific ads. For Prebid.js:

pbjs.enableAnalytics({
pbjs.setConfig({
	ortb2: {
    	user: {
        	geo: {
            	country: "USA",
            	region: "NY",
            	city: "New York"
        	}
    	}
	}
});

This example sets up geographic targeting for users in New York City. You can adjust these parameters to target different locations.

For Prebid Server, geographic information is usually determined server-side based on the user's IP address and included in the bid request. 

These targeting parameters provide powerful tools for optimizing your ad inventory in both Prebid.js and Prebid Server implementations. By using them effectively, you can create more valuable ad inventory, potentially leading to higher CPMs and improved fill rates. 

Remember to balance targeting precision with maintaining a broad enough audience to ensure healthy bid competition.

How to Set Up Prebid Targeting

Now that we've covered the key targeting parameters, let's look at how to implement them in your Prebid setup. The process is straightforward, but it requires attention to detail.

Setting Up Targeting in Prebid.JS

For Prebid.js, you'll typically set up targeting like this:

pbjs.enableAnalytics({
pbjs.addAdUnits([{
    code: 'ad-unit-1',
    mediaTypes: {
        banner: { sizes: [[300, 250], [300, 600]] }
    },
    bids: [{ bidder: 'examplebidder', params: { placementId: '12345' } }],
    targeting: {
        'position': 'sidebar',
        'content': 'article',
        'visitors': 'returning'
    }
}]);

Remember, ad unit level targeting takes precedence over global targeting where there's overlap, so use each method strategically.

You can continue adding different types of targeting in the same manner, such as user-based targeting, geographic targeting, or device-based targeting. The structure remains consistent, allowing you to easily expand your targeting strategy as needed. 

Start with these basic setups and gradually refine your targeting strategy based on performance data. Remember to balance targeting precision with maintaining a broad enough audience for healthy bid competition.

Configuring Targeting for Prebid Server

For Prebid Server, the configuration would typically be done in a JSON or YAML file, depending on your setup. The concept is similar, but the implementation details differ. 

Here's an example of how you might set up targeting in a Prebid Server configuration file:

pbjs.enableAnalytics({
{
  "targeting": {
	"pricegranularity": {
  	"precision": 2,
  	"ranges": [
    	{"min": 0, "max": 20, "increment": 0.1}
  	]
	},
	"includewinners": true,
	"includebidderkeys": true
  },
  "ext": {
	"prebid": {
  	"targeting": {
    	"mediatypepricegranularity": {
      	"banner": {
        	"ranges": [
          	{"min": 0, "max": 20, "increment": 0.5}
        	]
      	}
    	},
    	"additionalBidders": ["bidderA", "bidderB"],
    	"prioritizeDeals": true
  	}
	}
  }
}

This Prebid Server configuration sets up price granularity, includes winning bid information in the targeting data, and specifies additional targeting options for specific media types and bidders.

It's important to note that while these examples demonstrate the basic structure, real-world implementations often involve more complex configurations and multiple layers of targeting. The key is to start with a basic setup and gradually refine it based on performance data and your specific needs

Now that we've covered the key targeting parameters, let's look at how to implement them effectively in your Prebid setup.

Testing Your Prebid Targeting Implementation

Proper testing is how you make sure your Prebid targeting is working effectively, whether you’re using a Prebid.js or Prebid Server setup, or a hybrid approach.

Here’s how to approach it in Prebid.JS: 

  1. Enable debug mode to monitor targeting parameters:

    pbjs.enableAnalytics({
    pbjs.setConfig({
    	debug: true
    });
    
    This allows you to view detailed information about bid requests, responses, and targeting in the browser console.
  2. Use your ad server's debugging tools to verify that key-value targeting is being passed correctly. Most ad servers provide console or debugging interfaces for this purpose.
  3. Implement test targeting parameters and verify they're applied:

    pbjs.enableAnalytics({
    pbjs.setTargeting('test_key', 'test_value');
    

For Prebid Server: 

  1. Review server logs to make sure targeting parameters are being processed correctly.
  2. Use test endpoints provided by your Prebid Server host to simulate bid requests with specific targeting parameters.
  3. Consider using A/B testing by sending different targeting configurations to Prebid Server and comparing performance.

For both implementations, regularly analyze your targeting performance using analytics tools. Compare metrics like CPM and fill rate across different targeting strategies to optimize your setup. 

Remember, testing should be an ongoing process. As you refine your targeting approach, continue to verify that changes are implemented correctly and deliver the expected results.

Common Prebid Targeting Challenges and Solutions

Even with careful implementation, you may encounter some challenges with Prebid targeting. Here are some common issues and how to address them.

Challenge 1: Dealing with Low Match Rates in Prebid Targeting

Low match rates can significantly impact the effectiveness of your targeting for both Prebid.js and Prebid Server implementations. Match rates refer to the percentage of users that can be identified across different platforms or demand partners. When match rates are low, fewer users can be accurately targeted, potentially leading to lower bid prices and reduced overall revenue. 

To address this challenge, publishers can focus on improving user identification while respecting user privacy. For both Prebid.js and Prebid Server, you might consider first-party ID solutions and explore alternative identification methods that don't rely on third-party cookies.

Challenge 2: Ensuring Privacy Compliance

With evolving privacy regulations like GDPR and CCPA, ensuring compliance while maintaining effective targeting can be challenging for both Prebid.js and Prebid Server implementations. 

For Prebid.js, integrate with a Consent Management Platform (CMP) to handle user consent. 

For Prebid Server, make sure you’re using server-side consent management. Many Prebid Server hosts offer built-in consent management features that can be configured to comply with various privacy regulations.

Challenge 3: Troubleshooting Prebid-specific Targeting Issues

Identifying and resolving targeting-related problems in Prebid can be complex due to the many moving parts involved in both Prebid.js and Prebid Server setups.

For Prebid.js, use browser developer tools to inspect network requests and console logs. Enable Prebid debugging for more detailed information about bid requests, responses, and targeting parameters. 

For Prebid Server, review server logs to identify issues with bid requests and responses.

Challenge 4: Addressing Discrepancies Between Prebid Targeting and Ad Server Targeting

Mismatches between Prebid targeting and ad server targeting can lead to lost revenue opportunities and inefficient ad delivery in both Prebid.js and Prebid Server implementations. 

Ensure that your Prebid targeting configuration aligns with your ad server setup. Use consistent key-value pairs across both systems. 

For Prebid.js, consider using functions to automatically set targeting on ad units. For Prebid Server, verify that the targeting information sent in bid responses matches what your ad server expects.

Challenge 5: Maintaining Targeting Effectiveness in a Cookieless Future

As third-party cookies phase out, maintaining effective targeting becomes increasingly challenging for both client-side and server-side Prebid implementations. 

Focus on first-party data strategies and contextual targeting for both Prebid.js and Prebid Server. Explore server-side identity solutions and consider using Prebid's Real-Time Data module to incorporate additional targeting signals from external providers. 

Are Your Ads On Target?

Prebid targeting is a powerful way to maximize ad revenue and improve user experience.If you do it well, you can create more valuable ad inventory, leading to higher CPMs and improved fill rates. However, effective implementation requires ongoing attention and optimization, making it complex to manage. 

If you want to maximize Prebid’s potential without the associated technical overhead, consider partnering with Playwire. We’ve already got Prebid integrations built and optimized, and can get you up and running quickly and easily, and without the headache. Get in touch now to start getting set up!


Updated Apply Now