Implementing the Anonymised Real-Time Data Module in Prebid.js: A Publisher’s Guide

As third-party cookies are phased out and privacy regulations tighten, publishers face the dual challenge of sustaining personalized advertising revenue while respecting user privacy. To address this, advanced real-time data (RTD) modules like Anonymised are appearing in the programmatic toolbox.

In this post, we’ll demystify how Anonymised’s Real-Time Data Provider module works within Prebid.js, what makes it relevant for privacy-conscious publishers, and exactly how you can set it up for operational impact.

Understanding the Anonymised Real-Time Data Provider Module

The Anonymised module integrates with Prebid.js as a privacy-preserving audience segmentation tool. Instead of exposing identifiable user data, it assigns users to anonymized audience cohorts—labels that capture shared interests or behaviors without tracking individuals.

How It Fits into the Header Bidding Flow

When a user lands on your site, the Anonymised Marketing Tag collects cohort segment IDs and stores them in the browser’s localStorage. As a new auction begins, the Anonymised RTD module retrieves these segment IDs and injects them into the bidstream, making them accessible to configured bidders. This targeted-yet-anonymous data can improve CPMs by giving bidders actionable segments with minimal privacy risk.

How to Add Anonymised RTD to Your Prebid.js Setup

Incorporating the Anonymised module has two core steps: building the module into your Prebid.js package and configuring it correctly during Prebid.js initialization.

Building and Configuring the Module

First, ensure your Prebid.js build includes both the main rtdModule and the anonymisedRtdProvider. Use a build command like:

– gulp build –modules=rtdModule,anonymisedRtdProvider,…

Next, in your Prebid.js config, use setConfig to define a realTimeData provider with the required parameters. Key settings include:
– name: Always ‘anonymised’
– waitForIt: If true, Prebid will delay the auction until segment data is loaded (important for maximizing match rates)
– params.cohortStorageKey: The localStorage key for segment IDs (typically ‘cohort_ids’)
– params.bidders: Array of bidder codes that will receive segment info
– params.segtax: Taxonomy ID (typically 1000)
– params.tagConfig: Object with Marketing Tag settings. Must include ‘clientId’ (assigned by Anonymised)
– params.tagUrl: (optional) Override script location if needed

The module’s setup is strict: if the clientId isn’t provided, the module won’t initialize. Double-check your tagConfig for accuracy.

Example Prebid.js Configuration

A typical implementation might look like this:

pbjs.setConfig({
realTimeData: {
dataProviders: [
{
name: ‘anonymised’,
waitForIt: true,
params: {
cohortStorageKey: ‘cohort_ids’,
bidders: [‘appnexus’, ‘pubmatic’],
segtax: 1000,
tagConfig: { clientId: ‘YOUR_CLIENT_ID’ }
}
}
]
}
});

Make sure your Marketing Tag is present on site; the RTD module relies on it for segment data.

Best Practices and Common Pitfalls for Publishers

Operationalizing the Anonymised module is straightforward, but a few details can trip up busy ad ops teams.

Key Mistakes to Watch For

– Leaving tagConfig.clientId blank or mistyped—this will block Marketing Tag initialization, resulting in no segment data.
– Not enabling waitForIt when you want high match rates—prebid auctions could fire before segment IDs are available, causing missed opportunities.
– Forgetting to add the full set of bidders under params.bidders—segments only benefit the bidders listed in your configuration.
– Overlooking site privacy messaging—the anonymised module can support your compliance narrative, but only if your privacy policies reflect its usage.

What this means for publishers

Anonymised offers a straightforward, privacy-focused way to continue audience segmentation in header bidding environments. By leveraging cohort-based IDs instead of personal identifiers, publishers can maintain demand partner interest and achieve meaningful CPMs without increasing privacy risk. Implementation is lightweight, but accuracy in config and Marketing Tag deployment is critical to avoid lost data or compliance missteps.

Practical takeaway

To get the most out of Anonymised RTD, build it into your Prebid.js package and ensure the configuration is correct—especially the Marketing Tag clientId parameter. Regularly audit your implementation after Prebid or site updates to catch issues early.

Keep your params.bidders list updated as your stack evolves to maximize segment value across all partners. Align your privacy policies and messaging with the anonymised approach to reassure users and buyers alike.

Done right, Anonymised helps you strike the right balance: sustainable audience targeting under the new privacy paradigm, with the operational control and transparency publishers need.