## The Era of Machine Learning

Machine learning (ML) is an automated algorithm that determines the optimal combination of ads, audience, and placement for best results as dictated by you. Major ad platforms such as Facebook and Google Ads offer ML to reduce your costs and maximize conversions. To reach its full potential, ML needs time, budget, and the occasional nudge from a human overseer.

## How Machine Learning Determines Budget

Machine learning is precisely what it sounds like: a machine that learns. In this case, the "machine" is an ad platform and the topic it's learning about is how to serve your ads best. You specify what conversions the computer should optimize for (such as a purchase or add-to-cart event), and ML gets to work looking for the best combination.

The more data the computer has access to, the faster it learns, but there's a minimum threshold for it to learn at all. That threshold varies by platform. Facebook's ML requires 50 conversions per week while Google's ML requires 7 conversions per week. Either way, the threshold dictates the recommended monthly budget for a given platform.

### Breaking It Down

``````budget = [CPA] * [required # of conversions] * [# of ad sets]
``````

Note that the number of ad sets refers to the concurrent ad sets on a given platform. Paused ad sets don't count here.

``````budget = \$20 * 50 * 6 budget = \$6000.
``````

This is the weekly budget since Facebook requires 50 conversions per week. To find the monthly budget, multiply it by four. In this example, that would be a \$24,000 monthly ad spend.

### Optimization to Fit Your Budget

If ML wants too much money, don't despair. There are three main tactics to reduce the needed budget but each one comes with tradeoffs.

#### Tactic #1: Pause Ad Sets

Pausing some of your ad sets reduces the needed budget but increases the total time needed to test all of the ad sets. In the end, you'll pay the same amount of money over a longer period.

#### Tactic #2: Aggregate Audiences

Instead of pausing ad sets, you can combine their audiences, resulting in fewer active ad sets. However, the big drawback here is that bad audiences might get mixed in with good ones. Mixing audiences like this may confuse the ML and deprive you of market knowledge.

#### Tactic #3: Optimize Upfunnel

A typical ecommerce funnel might look something like this:

1. User clicks an ad: `page-view`
2. User add a product to their cart: `add-to-cart`
3. User starts the checkout flow: `initiate-checkout`
4. User pays for their product: `purchase`

As results-focused marketers, our instinct is to tell the computer to optimize for the event we care most about. In the example above, that's step #4 ­— the `purchase` event. Unfortunately, that's also the rarest event. Each step of the funnel has some drop-off, and there's a good chance that only 1-10% of users reach the end. That kind of attrition is normal but makes it hard to get enough data to teach the computer.

That brings us to tactic #3: optimizing for upfunnel events. Instead of telling the ML to maximize the number of `purchases`, consider asking it to focus on `initiate-checkouts`. There will be more `initiate-checkouts` than `purchases` for the same budget. The extra data means ML can learn faster and better without increasing ad spend.

If initiate-checkout is still too expensive, you can go even further upfunnel. Try optimizing for add-to-cart or other engagement indicators such as mailing list signups, landing page views, or even ad clicks.

However, upfunnel optimization isn't a silver bullet. The further you move upfunnel, the more uncertainty you introduce into your advertising. Users who add to cart may not be inclined to checkout. There's a chance that the ML ends up optimizing for an audience that never finishes the funnel.

If you decide to optimize upfunnel, we recommend keeping a close eye on the funnel analytics to prevent the computer from accidentally sabotaging you.

Example. Suppose that your average `purchase` CPA is \$100. With one ad set, this results in a \$5000 (\$100 * 50 * 1) weekly ad spend if you target the `purchase` event.

Now, suppose that 70% of `initiate-checkouts` convert to `purchases`. In this case, an `initiate-checkout` has a CPA of \$70. Targeting the `initiate-checkout` event would reduce your ad spend to \$3500 (\$70 * 50 * 1).

Lets go upfunnel by another step to `add-to-cart`. Suppose that 20% of `add-to-carts` convert to `initiate-checkouts`. Then the CPA for `add-to-cart` is only \$14, resulting in an ad spend of just \$700 (\$14 * 50 * 1).

## Is It The End All Be All?

No. Machine learning isn't practical for every business. Small startups may not have the ad budget required or they might not have good benchmarks for CPA. In these cases, you'll have to settle for click and traffic optimization.

There's an ML saying: garbage in, garbage out. No amount of fancy tech can replace good product-market fit and a solid sales funnel.