Ad Delivery and Pacing Algorithms

Pacing is the control logic that determines how an advertiser's budget should be spent relative to time. An analogy is to an athlete running in a race: sprint too early and risk fading away before the finish line, but sprint too late and never make up the distance. Pacing ensures uniform competition throughout the day across all advertisers and automatically allocates budgets to different ads. Pacing is a core part of the optimization which ensures that return on investment (ROI) is maximized for the advertisers.

How Facebook's pacing algorithm works

We will explain how pacing works by going through an example. Note that the example talks about click, but the same idea applies for view, conversion, action, reach, etc.

Setting

  1. An advertiser wants to promote a sports product. They set a daily budget of $10. The bid type is CPC and the advertiser knows that each click produces a value of $5.
  2. Then he or she creates an ad, optimized for LINK_CLICKS, with the bid_amount as $5 and billing_event as LINK_CLICKS, based on their true value. The target audiences are male 25-35.
  3. Profit to the advertiser is the value generated from these clicks minus the budget spent.

To explain pacing with simpler terms, we assume that the price of all opportunities (clicks, impressions, etc) during the day are known beforehand. With this we can order the clicks based on their price to help us illustrate this better. This assumption is relaxed by modeling all the opportunities based on the target.

Below we will go through 3 different cases of bidding strategy to understand why pacing provides the maximum value for this advertiser.

Case 1: No pacing

Without pacing, the advertiser is getting all clicks up front (potentially the costly clicks) exhausting all the budget in the early part of the day. This also creates higher competition early in the day and lower competition later in the day for other advertisers. The effect is illustrated in the below figure where the blue dots are ad opportunities and the yellow circles are the opportunities won by this ad. The result is that the average cost would be high, but the advertiser would get the most delivery allowed by the ad's settings. This is called accelerated delivery.

Total budget spent = $10
Total value = 6 * $5 = $30
Value per click = $5
Budget = $10
Profit for the advertiser = $30 - $10 = $20

Case 2: Bidding too low

When pacing is bidding low on the cheapest clicks, the advertiser gets very few clicks as shown and budget is not exhausted.

Total budget spent = $4
Total value = 4 * $5 = $20
Value per click = $5
Budget = $10
Profit for the advertiser = $20 - $4 = $16

Case 3: Balanced Pacing

When pacing is done optimally, as shown in the image, the advertiser is getting the most number of clicks while exhausting the set daily budget.

Total budget spent = $10
Total value = 7 * $5 = $35
Value per click = $5
Budget = $10
Profit for the advertiser = $35 - $10 = $25

The simple formula

As you can see from the above scenarios, when we use a constant bid over the entire period, the value for the advertiser is maximized as compared to no pacing or bidding too low or too high. To achieve this goal pacing tries to come up with an optimal bid by learning from other ads competing for the same target audience. Here is a simple formula to explain this:

Final bid (per impression) = optimal bid (per impression) * CTR
where optimal bid <= max_bid

Determining this optimal bid value is the core learning part of the pacing algorithm, which includes feedback systems to keep pacing on track.

CTR is the click through rate applied for clicks. We use the similar concept of view through rate (VTR) for impressions and conversion rate (CVR) for conversions. These values are constantly being improved for accuracy and are influenced by many different factors such as the type of ad, the targeted audience, time of the day, the context in which the ad is shown and much more. In fact, there is an entire team working to ensure that this rate reflects the most accurate result. This is not part of the pacing algorithm.

The importance of pacing

Pacing maximizes an advertiser's profit for a given budget. It allows advertisers to be truthful, combined with Vickrey–Clarke–Groves (VCG) auction there is no incentive to lie about the value and no need to think about what the max bid should be set to. It also avoid arbitrage opportunities in the auction system.

Pacing ensures predictable delivery. This consistent delivery allows for stable prices throughout the day and helps all advertisers get fair access to their target audience.

FAQ

Q: My ads are not pacing correctly, what do I do?

A: If the ad is under delivering: one reason could be that the bid price might be too low. Ensure that your bid is well within the suggested bid range in order for your ads to win auctions and secure placement. With competitive target audiences, you might find that you need to bid above the suggested bid range.

Another reason could be that targeting is too narrow.

If the ad is over delivering, you might have a very large audience that is exhausting the budget really quickly. If that is not the case, you should file a bug on the support portal.

Q: Will pacing be done at ad sets or ad campaign Level?

A: Ad campaigns will not affect pacing. As each individual ad set will have its own budget and its own schedule, pacing will remain at the ad set level.

Q: When I change my budget, will it impact pacing?

A: When the budget is changed pacing has to learn the new optimal bid, this learning process can take some time. During this process the bids are not optimal, hence the value is not maximized for the advertisers. This is the reason why changing bid and budget frequently is not recommended.

Q: Then what is the best time to change the bid or the budget?

A: So if you have to change these parameters for any reason, 2-3 times within a day or making the change in the early part of the day, does not affect pacing as much as changing it often or in the later part of the day.

Q: What about the campaigns that run only a day or shorter?

A: Learning happens within a day, so this should not be a problem.

Q: I have been running ads with billing_event as IMPRESSIONS for a few days and now I switched the billing_event of the same ad to LINK_CLICKS. Will this affect pacing in any way?

A: This should not affect pacing very much. However since you are switching from a view based model to click based model, the learning will need to readjust.

Q: I don't see "max_bid" for all different bid types, where do you get that information?

A: Max bid is bid_amount of an ad set you specify regardless of its optimization goal.

Q: How does day parting and pacing work together

A: Ad scheduling allows you create a schedule of hours of the day and days of the week when you want your ads to be shown to the target audience. This enables you to have your ads shown when they are most relevant to the target audience. Pacing takes this schedule into account when calculating the optimal bid. More information on ad scheduling.

Q: Can I disable pacing?

A: Yes, with accelerated delivery you can disable pacing. This can be used when you want to show your ads as quickly as possible instead of paced over the entire day. More information on accelerated delivery.

Q: How are ad set budgets spent on partial days?

A: Starting April 9th, 2014, Facebook updated the way budgets are spent on partial days at the beginning and end of advertisers’ ad set schedules to more closely align with advertiser expectations. For ad sets with daily budgets, we will adjust the first and last day spend based on the number of hours that we have to deliver ads on those days. For example, if an advertiser starts an ad set at 6PM, we will now try to deliver only 25% of their daily budget between 6 PM and midnight.