How to Use Meta Object Bid Filtering in Prebid.js for Publisher Control

Header bidding offers publishers unprecedented control over which ads appear on their sites, but with that freedom comes new operational challenges. One of the most critical is ensuring that only desirable ads—and advertisers—can win an auction and appear to your audience.

In this post, we’ll explore how publishers can use Prebid.js’s meta object bid filtering to screen incoming bids based on key metadata. This flexible approach empowers publisher ad ops teams to maximize revenue while keeping a tight rein on brand safety and advertiser mix.

Understanding Meta Object Bid Filtering in Prebid.js

Meta object bid filtering is the process of examining bid responses for specific metadata—fields that describe the bidder, advertiser, or creative—and then allowing or disqualifying bids based on publisher-defined rules. In Prebid.js, each bid response can include a ‘meta’ object containing details such as the advertiser’s domain, creative ID, or category.

For example, by filtering bids based on the advertiser domain, publishers can block bids from competitors or restricted industries before those ads ever reach the page. This is particularly useful for publishers concerned about regulatory compliance or brand reputation.

How the Meta Object Works in Practice

When a bidder responds to a Prebid.js auction, it can include a meta object like this:

{
“meta”: {
“advertiserDomains”: [“example.com”],
“mediaType”: “banner”
}
}

The publisher’s JavaScript logic can then check for the presence and value of these fields, rejecting or allowing bids accordingly before calling the ad server. This gives publishers a programmable way to enforce advertiser blocklists or category filters without manual review.

Implementing Meta Bid Filtering in Your Header Bidding Stack

Adding meta object bid filtering to a Prebid.js implementation is straightforward, but there are important considerations for how and where to apply these checks. The most common and scalable approach is to use a function that inspects each bid’s meta data as part of the bidsBackHandler.

This logic is placed before the ad server is called, ensuring non-compliant bids are marked as “used” (i.e., ineligible) and do not participate further in the auction or delivery.

Example Filtering Logic

Suppose you want to block any bid that lacks an ‘advertiserDomain’ or matches a known list of competitors. Your filter function might look like this:

function isBlockedAd(meta) {
if (!meta || !meta.advertiserDomains) return true; // Block bids with missing domain
const blockedDomains = [“competitor.com”, “blockedbrand.com”];
return meta.advertiserDomains.some(domain => blockedDomains.includes(domain));
}

Within the Prebid.js workflow, after bids come back, the function iterates over bids, using this logic to determine which to invalidate or allow.

Common Pitfalls and Recommendations

While meta object filtering provides strong controls, there are areas where publishers often stumble. The most frequent issues include:

– Relying on incomplete or inconsistent metadata from bidders.
– Applying overly broad filters that accidentally block too many bids and reduce competition.
– Failing to test filtering logic under realistic traffic conditions.
– Not updating blocklists in line with evolving business needs or seasonal campaigns.

To avoid these pitfalls, always validate the completeness of meta data from your demand sources, implement fallback logic for missing meta fields, and carefully monitor yield impacts after changes.

Advanced Approaches: Modular and Scalable Filtering

For larger operations, or where multiple blocklist rules are needed, adopting a modular approach is recommended. Prebid.js offers a ‘bidResponseFilter’ module, which centralizes and standardizes bid filtering across all Ad Units and adapters. This method reduces maintenance overhead and ensures compliance with corporate policy at scale.

Even with custom logic, always consider version control and documentation. Poorly documented filtering can become a troubleshooting nightmare as teams and requirements change.

What this means for publishers

Meta object bid filtering allows publishers to enforce brand safety, comply with advertiser restrictions, and maintain a curated ad experience without manual review. When used correctly, it empowers ad ops teams to fine-tune ad quality, minimize operational risk, and maximize safe revenue without losing transparency.

Practical takeaway

For publishers, implementing meta object bid filtering in Prebid.js is both a responsibility and an opportunity. It gives you a precise tool to block unwanted campaigns, protect your brand, and avoid compliance issues—if you use it wisely.

The process hinges on understanding your available bidder metadata, building robust filter logic, and continually monitoring yield and block effectiveness. Start by working with your demand partners to ensure they send complete meta objects, then implement and carefully test your filters before going live. Revisit your logic and blocklists periodically to adapt to changing business goals and industry threats.