Books

Growth 365

Tomas Laurinavicius

ChaptersFeed the Algorithm Real Revenue

Feed the Algorithm Real Revenue

Pipe closed-won revenue into the ad platform instead of optimizing to a pixel fire.

Most ad accounts optimize toward the easiest thing to measure, not the thing that pays your bills. A pixel fires the second someone submits a form, and Meta or Google's auto-bidding goes hunting for more people who do exactly that. The problem is "submitted a form" and "became a paying customer" are two different populations, and the algorithm has no way to tell them apart unless you tell it. Your CRM already knows the difference, stage by stage, deal by deal. Wire that data into the ad account and the algorithm stops chasing form-fills and starts chasing revenue.

What to do: Map your CRM's pipeline stages, MQL, SQL, Opportunity, Closed-Won, to real dollar values, then fire each stage change as a server-side event into Meta's Conversions API and Google's Enhanced Conversions for Leads, tied back to the original click ID. Point campaign optimization at that deeper, value-carrying event instead of the default lead-form-submit, so the bidding algorithm trains on who actually buys, not who merely filled in a field.

Why it works: Auto-bidding only learns what you feed it, and a lead-form event teaches the algorithm to find more form-fillers while a closed-won event teaches it to find more buyers.

Example: Honeycomb.io, the observability platform, worked with the agency Seer Interactive to connect its Salesforce pipeline to Google Ads instead of stopping the data trail at the lead form. Within the first month of sending pipeline stages back into the ad account, they traced three closed-won deals directly to specific campaigns, a link their platform's default lead-conversion event could never have shown them, and set a working target of 10 to 15 closed-won deals a month, enough volume to eventually let Google's bidding algorithms optimize on revenue instead of raw lead count.

Walk it through

There's no live page to pull up for this one either. The whole mechanism lives inside your CRM and your ad accounts, not on a public URL. Here's how the plumbing actually goes together.

1. Put a dollar value on every stage, not just the last one. Closed-Won is the number you care about, but it happens too rarely, early on, to teach an algorithm anything. Give MQL, SQL, and Opportunity their own smaller values too, based on your actual stage-to-close rates, so the platform has a signal to learn from while you build up Closed-Won volume.

2. Fire the event the moment the stage changes, not in an overnight batch. A webhook off your CRM's stage-change trigger, not a nightly export job, is what keeps the event close enough to the original click for the platform to still credit it correctly.

3. Send it in the shape the platform actually expects. A Meta Conversions API call for a closed deal looks like this:

curl -s -X POST "https://graph.facebook.com/v20.0/act_<id>/events" \
  -d 'data=[{
    "event_name":"Purchase",
    "event_time":1752500000,
    "action_source":"system_generated",
    "user_data":{"em":["<sha256-hashed-email>"]},
    "custom_data":{"value":420.00,"currency":"USD"}
  }]' \
  -d 'access_token=<system-user-token>'

Hit that endpoint with a placeholder token instead of a real one, which is exactly what I did to check the shape, and Meta's live API answers before it even checks who you are:

{"error":{"message":"Invalid OAuth access token - Cannot parse access token","type":"OAuthException","code":190,"fbtrace_id":"A2N7sjsTZZSx4iz81gWdkzg"}}

That's a real response from a real, running endpoint. Swap in a valid system-user token and a correctly hashed email and the same call books a dollar-denominated Closed-Won event straight into the ad account.

4. Repoint the campaign's optimization event. In Meta, switch the ad set's optimization event from "Lead" to the value-carrying event you just wired up. In Google Ads, move the bidding strategy toward Target ROAS or Conversion Value once your monthly volume supports it. Until then, keep bidding on the higher-frequency stage and let the dollar values ride along as enrichment.

The read

  • What you optimize for is what you get more of. Point bidding at "Lead" and you get more people who fill out forms. Point it at "Closed-Won" and you get more people who buy.
  • Match quality is the whole game. A closed-won event with no click ID or a badly hashed email attached is data sitting uselessly in your CRM. Attribution back to the original click is what makes any of this count.
  • Volume decides which stage you can actually bid on. A trickle of closed-won deals a month gives an algorithm almost nothing to learn from, which is why most teams bid on SQL or Opportunity volume and layer Closed-Won values on top rather than optimizing directly on the rare event.

Steal it

Run this on your own pipeline before you touch another ad creative. Identify the CRM stage that correlates with real revenue, trial-to-paid or paid-to-expansion, whatever fits your business, and assign it a dollar value using your actual average contract size, not a guess. Most CRMs, HubSpot, Salesforce, Pipedrive, have a native path or a one-step Zapier connection into both Meta's Conversions API and Google's offline conversion import. Wire it even while your closed-won volume is small. The plumbing being ready is what lets you flip the bidding strategy the day your volume finally supports it.

Defend two things once it's running. First, defend the number itself. If a rep can mark a deal Closed-Won and it unwinds a week later on a chargeback or a cancelled contract, decide up front whether you correct the ad platform or eat the noise, because a platform trained on revenue that later disappears is training on a lie. Second, defend the data. Hash every piece of personal information before it leaves your server, send only what the platform's schema requires, and confirm you have a legal basis to pass a customer's purchase back to a third-party ad platform in every market you sell into. That consent conversation is not optional once real identity and real revenue are involved.

Gotchas

  • Low volume starves the model. A B2B pipeline closing a handful of deals a month gives Meta or Google's bidding algorithm almost nothing to optimize on. Keep an earlier, higher-frequency stage in the loop as the primary bid event until Closed-Won volume catches up.
  • Stale events weaken the link. If your webhook batches overnight instead of firing in real time, the click ID may have aged out of the attribution window by the time the platform sees the event, and the signal arrives too late to connect spend to result.
  • Honest caution: this only makes the algorithm as good as your CRM. A sales team that marks deals MQL or Closed-Won loosely is feeding the platform confident, expensive noise instead of a shallow-but-honest form-fill. Clean up the CRM discipline before you wire it into six figures of monthly ad spend, not after.