How to Rule Your Media Buying with a Rule Engine

Yoav Goren
VP of Ad Operations
Share Button

Rule Engines Bring Much-Needed Order to Media Buying

Many demand side platforms (DSPs) claim they have a performance algorithm that effectively predicts the probability of a click and conversion, adjusting bids in real time accordingly for any media source, creative, device, time of day, and so on. But there has yet to be an algorithm that supports all media buying needs. So for the time being, media buyers still need to pick up the slack and do the manual work to reach their campaign KPIs. And there are a few tools that can help – retargeting capabilities, micro bidding, integration with data providers or a DMP, a built-in insights system, and a sophisticated rule engine.

So What Is a Rule Engine?

A rule engine is a tool that allows media buyers to set predefined rules for a DSP to follow throughout the entire lifecycle of a campaign. And it can be a serious game-changer for media buyers, if used correctly. But first, there are some basics to go over.

Let’s first assume that the general lifecycle of a campaign takes place over 3 phases: (1) Exploring (2) Defensive Optimization (3) Offensive Optimization


Exploration: Targeting a wide range of media sources and collecting data on the campaign’s performance, focusing on CPA above the goal and high media spend. The rule engine is mainly used during the exploration phase.

Defensive Optimization: Non-performing sources are excluded, and only sources that concern the campaign KPIs remain, resulting in low CPA and low scale.

Offensive Optimization: Increase spend on the performing sources in order to scale up the campaign. CPA should be close to reaching the goal.

The rule engine is mainly used during the exploration phase, but many DSPs still don’t offer one. myDSP is one of the few that has one.

Warning – I’m about to delve deep into the awesomeness of the DSP rule engine. It isn’t for the faint of heart.

The ability to exclude specific targets is one of the best features of the rule engine. For example, with a campaign that has a CPA goal of $1, we can define the following rule:

If the cost of a media placement is above $1 and there are no conversions, the source should be excluded from campaign targeting.

This is a very intuitive rule, but it’s not a perfect solution. Why? For 2 reasons:

  1. We can’t always exclude a source if we spent more than the CPA goal with no conversions. It might be that if we had spent a bit more, we would have seen a conversion, and lowering the bid will help us reach the campaign’s goal.
  2. Making an optimization decision only after we spend at least the CPA goal on any source will result in very high spend during the exploration phase. This can jeopardize the entire campaign, making it difficult to reach the campaign’s goal. Just think about a campaign with $5 CPA or higher.

How can we overcome these issues? First of all, campaigns with different CPA goals should be treated differently – in most cases there is a negative correlation between the CPA value and the conversion rate or the chance of a conversion. We expect a higher conversion rate for lower CPA. Meaning, that for every dollar we spend, we expect to see more conversions. Thus, in order to deal with the first issue, we can be flexible with our spending when the CPA is low compared to the flexibility when it is high. We can use tiers to solve this.

Breaking It Down into Tiers

Using tiers means that we act differently for different CPA goals when it comes to spend per source.  For example, let’s define a tier as campaigns with a CPA goal between $0.1 to $5, and we’ll enable the campaign to spend twice the CPA before taking an action. The next tier will be for campaigns with a CPA goal between $5 to $10, and we’ll enable a spend of 150% of the CPA. And for a CPA above $10, we want to take action the moment we spend more than the goal.

Here we’ve solved the first with tiers, but we’ve yet to address the second issue. In order to resolve it, we must define rules that will help us come to a quicker decision – with minimal spend. A good way to do this is using combined clicks as a factor. But to do so, we must first assume 2 things:

  1. CTR is a relatively stable variable – meaning that specific creatives on specific placements will have a similar click-through rate throughout the lifetime of a campaign, without fluctuating.
  2. The Conversion Rate (conversions/clicks) is not normally distributed and most of the conversions are generated with a low conversion rate.

Taking It One Step Further

Now let’s use an example where we’ve analyzed some data and we saw that in most cases, the conversion rate is below 25%. This means that in most cases we expect a conversion only after at least 4 clicks.  In this example, we can define a rule that will act once our campaign spend on a source is only 25% of the CPA goal.

If the above assumption is true and the CTR is similar no matter if we had spent 25% or 200% of the CPA goal, then if we had no clicks after spending 25% of the CPA goal, we will have less than 4 clicks after we spend 100% of the CPA goal. Combining this with our understanding that in most cases the maximum conversion rate is 25%, and  we have to get at least 4 clicks before we see a conversion. Thus, there’s no reason to keep spending on this source.

This is a good rule, but it won’t cover 100% of the cases, and we’ll probably miss some opportunities. This is why we should consider the risk of losing opportunities vs. the risk of high media spend (and cover most of the opportunities). But remember that the whole idea is to find a solution for the second issue, which we’ve now done.

What Else Can You Do with a Rule Engine?

Now, keep in mind that all the rules in this post are general examples and their purpose is to demonstrate the best ways to use a rule engine. It’s important to note that rules can be combined and a campaign can run more than one rule at a time. Not to mention that the rules I’ve described specifically deal with media sources, while other rules can relate to creatives, carriers, placements, etc. Rules can also run on different frequency – hourly, daily, and weekly.

But you have to start somewhere, and a sophisticated rule engine can make a huge difference for your campaigns – it saves time, it’s efficient, and it makes the most of your ad spend. If you have the option work with a DSP that has a rule engine, don’t hesitate – use it.

Want to take a closer look at a smart rule engine? Visit myDSP!

Share Button
Share Button

Get the latest smart tips & news from our experts!