Adray

· , Co-founder

Lead attribution: how to connect your ads with the deals closed in your CRM

Lead attribution: how to connect your ads with the deals closed in your CRM

How do I know which ad campaigns bring leads that turn into paying customers, not just leads?

For a business that sells through leads, the ad platforms report the one number that matters least: how many forms were filled. A campaign can produce hundreds of cheap leads that never answer the phone, while another produces a few expensive ones that become your best customers, and cost per lead ranks them backwards. Fixing that means carrying the campaign from the ad, through the form, into the CRM, and all the way to the closed deal.

Talk to SalesMulti-touch attribution anchored on your real orders.

Why cost per lead misleads

Cost per lead is easy to measure and easy to optimize, which is the problem. Platforms deliver more of whatever you optimize for, so a campaign optimized for form submissions finds people who submit forms. If those people rarely buy, the platform does not know and does not care. The number to decide budgets on is cost per closed deal per campaign, or, while you are collecting enough closes, cost per qualified lead.

The chain from ad to deal

Every link has to hold for a closed deal to reach the campaign that started it:

  • The click carries the campaign. UTMs on every ad URL, plus the platform's click ID (gclid from Google, fbclid from Meta) that arrives automatically.
  • The form captures it. Hidden fields store the UTMs and click IDs from the landing URL at the moment of submission.
  • The CRM keeps it. Each hidden field maps to a property on the contact or deal, written when the lead is created.
  • Stages stay linked. Qualification, meeting, proposal and close update the same record, so the campaign travels with the deal.
  • The result goes back. Stage changes are reported to the ad platforms, so they can optimize toward leads that convert.

Step 1: capture the campaign in the form

Add hidden fields for utm_source, utm_medium, utm_campaign, utm_content, gclid and fbclid. Fill them from the landing page URL with a small script or your form tool's built-in option, and persist them for the visit so a person who browses two pages before converting still carries them. This is unglamorous and it is where most lead attribution fails.

Step 2: keep it in the CRM

In HubSpot, Salesforce or any other CRM, create a property for each field and map the form to it. Write the values when the lead is created and never overwrite them with a later visit, or the first campaign that brought the lead disappears. If the same person converts again later, store the new source as a separate touch.

Step 3: send stage changes back

Both major platforms accept what happens after the form:

  • Google Ads imports offline conversions tied to the click ID, and its enhanced conversions for leads use hashed data from your website forms, together with the offline conversions you import, to attribute a closed sale back to the campaign. We cover the hashing rules in Google Enhanced Conversions.
  • Meta offers a Conversions API for CRM integration: your CRM sends lead-stage events, and its conversion leads performance goal uses them so lead ads are delivered to people more likely to become customers rather than simply to fill forms.

Send each change as it happens. Platforms limit how long after a click they accept an offline conversion, and a close reported months later cannot help the campaign that produced it.

Step 4: report on the right stage

Pick the stage closest to revenue that happens often enough to measure weekly per campaign. At first that may be a qualified lead or a booked meeting; once you have enough closes per campaign, move to closed deals and revenue. Read closes by the date the lead was created, so a campaign is judged on the leads it produced, not on the month the sales team happened to close them.

WhatsApp and phone leads

Many leads never touch a form: they call, or open a WhatsApp chat. The same chain applies with a different first link, a click ID or a reference code carried into the conversation, which we cover in how to measure the sales that reach you on WhatsApp.

From closes to acquisition cost

Once closed deals are tied to campaigns, you can compute what each new customer costs by channel, which is what most budget conversations are really about. We show the calculation, and why platforms get it wrong, in how to calculate the CAC of new customers.

Where Adray fits

Adray's lead-generation variant handles the first half of the chain: it counts verified form fills from the pixel, attributes each one to its channel and campaign from the click IDs and UTMs of the visit, and reports cost per lead next to what each platform claims. The closed-deal half lives in your CRM, and the stronger the chain above, the more of those deals you can trace back.

Common questions

How do I pass UTMs from a form into my CRM?

Add hidden fields to the form (utm_source, utm_medium, utm_campaign, and the click IDs gclid and fbclid), fill them from the landing URL with a small script or your form tool's option, and map each one to a property on the CRM record. Store them when the lead is created, not later.

What is offline conversion tracking?

Reporting a conversion that happened outside the website, such as a deal closed by phone, back to the ad platform. Google Ads imports offline conversions tied to the click ID, and its enhanced conversions for leads can match them with hashed data from your forms.

What is Meta's conversion leads optimization?

A performance goal for Meta lead ads that uses the lead stages you send from your CRM through the Conversions API to deliver ads to people more likely to become customers, instead of maximizing form submissions.

Which stage should I optimize and report on?

The stage closest to revenue that happens often enough to measure each week. For many businesses that is a qualified lead or a booked meeting at first, moving to closed deals once enough of them accumulate per campaign.

What if the lead closes weeks later?

Keep the campaign on the CRM record so the close is attributed whenever it happens, and read campaign results on closes by the date the lead was created. Platforms also limit how long after a click they accept an offline conversion, so send stage changes as they happen.