For a given day, I would like to get the estimated number of eligible impressions a campaign will have, in order to allocate my budget and implement a traffic based pacing algorithm.”
The estimated number of eligible impressions, or audience forecasting or “avails” as they say in the industry, can be derived in several ways. I will illustrate two of the methods.
The long, but easy method
The easiest way to estimate your avails would be to just take a whole day’s worth of data and determine how many of your target users are in there. The problem with this method is that it can take a whole day. If you have a day to spare, this is a good way to go.
The short, but difficult method
For this to work you’ll need the total traffic available for some previous day, or week. You’ll want that data broken down by hour or maybe 15 minute interval. With more traffic, your breakdown can be smaller. For the sake of this example let’s look at an hourly breakdown and a single day’s worth of data.
You’ll also need an hours worth of data from your target segment (eligible impressions). Any hour will do, so long as it can be aligned with an hour from your larger set of total traffic data. Now you can take your hours with of data and figure out what percentage of the total traffic it makes up. “target segment hour” / “traffic from corresponding hour of total traffic” = “target segment’s percentage of total traffic”
Now you can take your percentage and apply it to the total traffic. That gives you your avails for the day.
Your campaign probably doesn’t need all the avails. You’ll want to pace it. In order to give you smooth pacing across the day you want to avoid an algorithm that takes the day’s needs, divides it by 24 and sets a cap by hour (1/24th of total need). This method doesn’t work very well because impressions are not spread evenly across a 24-hour period.
Instead, you’ll want to look at the percentage of the avails your campaign needs. Maybe your campaign needs 25% of the avails. You want to instruct your pacing algorithm to serve your campaign for every 4th impression that matches the targeting criteria. Obviously include a little padding in the algorithm so you don’t run out of avails at the end of the day. Be sure to recalculate the avails frequently and try to take into account seasonality (weekdays, holidays, etc…).
For more fun with pacing algorithms check out my pacing blog post over at the Rubicon Project’s blog.