How we built a bid shading tool to reduce CPMs by 15%

Prakhar Yadav
MiQ Tech and Analytics
6 min readFeb 22, 2023

Prakhar Yadav, Senior data scientist, MiQ

The backbone of programmatic advertising is when advertisers bid for impressions at auctions. But with so many advertisers and campaigns, it would be impossible for each bid to be set manually by a human. Advertisers instead instruct traders on the campaign requirements. Traders then set bidding instructions on platforms where auctions occur — known as demand-side platforms (DSPs).

Here’s how it works: an advertiser shares the budget and brief with a trader — e.g. £500 to be spent over the next two weeks targeting families interested in moving home, together with the campaign goals e.g. number of clicks, page visits or purchases. The trader then decides how much each bid should be, trying to achieve the campaign goals while staying under budget. This is how trading practices can determine and improve campaign efficiencies. Here’s an article to learn more about the role of a trader.

Let’s look at the role of bid shading in this process.

What is bid shading and how does it improve campaign efficiencies?

First-price auctions, where the buyer with the highest bid wins and pays their winning bid for the impression, are becoming increasingly popular. This may sound like standard practice at an auction, but is notably different to second-price auctions which have long been the most common in advertising. Here, the highest bidder still wins but the price is set by the second-highest bid.

For example, at a second-price auction, there are three bids at $17, $19 and $22 each. The buyer bidding $22 wins but only pays $19.01.

This shift to first-price auctions means buyers often end up paying more as they try to guess what others have bid, leading to impressions selling for more than they are worth. In response to this, bid shading came up as a solution. Originally offered by DSPs and ad exchanges, bid shading allows the winning bidder to pay a price between the highest and second-highest bids, rather than always forking out the highest amount. This price is determined by algorithms.

Why we built our own tool

This may sound like the perfect solution, but there are a few issues with using DSPs’ bid shading services:

  1. Cost: some DSPs charge a fee based on money saved
  2. Transparency: there’s a lack of insight into how DSPs calculate optimal prices, meaning buyers have to trust that they are being charged fairly

MiQ is always on the lookout for ways to improve campaign efficiencies. As the rules around bid shading were changing, our data scientists were taking notes and planning our next steps. Factoring in the fee that DSPs charge to use their bid shading technology, we realized that building our own solution would be more cost efficient. We’d be spending less to win ad impressions, allowing us to reach more of our clients’ audiences with the same budget.

And with a suite of proprietary technology already in place at MiQ, we knew we had the tech advantage necessary to build our own solution.

Here’s what we came up with:

Step one: Identifying eligible campaigns and line items

Line items are the most intricate part of an ad campaign. They contain details about start and end times for the campaign, pricing and targeting — for example, specifying weather triggers to be used in creative messaging to advertise raincoats only when it’s raining.

Not all lines are appropriate for bid shading. This is because if a line is targeting inventory which is not available more cheaply, shading the bid for that line may lead to losing the bid and the ad being shown less (delivery drop).

So, we created a logic of predefined rules that tell us which lines are eligible for bid shading.

Step two: Using ML predictive models, rank and combine features based on performance and efficiency

Having identified suitable lines, we then select the three most influential features (e.g. ad placement) by line item, using domain knowledge to enhance this selection.

Features and CPM

Then, we try to estimate the ideal CPM for features based on the historical performance of the campaign over the past seven days. Each feature combination is aggregated and statistically ranked to identify the most efficient paths — those with a lower CPM and better performance.

The work that happens behind the scenes needs to happen at speed, which is why automation is so necessary — a human couldn’t do this analysis in the time required. Automating this type of advanced optimization is also significant as it means we can use this across all of our clients and improve our solution over time.

Step three: Apply confidence scores to scale learnings across networks and platforms

We take a confidence score of the same features delivering in other lines at a network level i.e. across all other campaigns, and statistically score the best paths.

MiQ is partner agnostic, meaning we work with multiple DSPs and networks. This is powerful as it allows us to evaluate and connect data across partners, ensuring we don’t end up stuck with a local best by looking only at data for a single campaign or DSP. It also allows us to scale our reasoning across multiple platforms and networks.

Once paths are score based on combined overall performance data, we estimate optimum CPMs of paths using a custom defined function:

Step four: Determining final line level recommendations and countering delivery drops with a feedback loop

After the best paths have been identified, feature combinations are rolled up into line-item level bids.

We also put bid shading control measures in place. This includes upper and lower thresholds to monitor whether the line experiences an unexpected drop in delivery. This is because it’s possible that we might have selected lines that were bidding accurately, leading to a delivery drop once bids are reduced. To protect against this we created a feedback loop that reverts back the bids of lines, that have experienced huge drops in delivery since going through the bid shading mechanism, to their previous values.

The feedback loop also combines the pre-post performance with DSPs’ inventory availability reports to estimate how accurate we were in predicting bids for lines. Based on this logic, lines are sorted into four buckets.

Each bucket uses a different scoring logic which controls how aggressively we want the bid shading module to be. This decision is made for each line.

The outcome and results

Building our own bid shading solution feeds into MiQ’s tech advantage: we like to build proprietary technology that connects data in an agnostic way to help deliver better results for our clients. Using Lab, our trading platform, MiQ traders can activate this ML tactic across multiple DSPs and networks, maximizing the opportunity to improve campaign efficiencies for our brands and marketers.

Since launching, we’ve already seen an average reduction in CPM of ~15–20% in initial testing, without any observed delivery loss in most cases. By improving campaign efficiencies for our clients, we can also improve metrics like cost-per-click (CPC), cost-per-completed-view (CPCV) and cost-per-acquisition, leading to better business outcomes for brands.

Looking for a programmatic partner to help you improve campaign efficiency without losing your ability to deliver outcomes? Let’s talk.

Prakhar is a senior data scientist at MiQ, based in our Bangalore office. Outside of work, he’s a keen cyclist and enjoys solo bike rides.

--

--