All posts

Field note

How to Connect Meta & Google Ads to Salesforce for Closed-Loop Attribution

Akshit Kandi
#Salesforce#Attribution#Data Cloud#Ad Platforms#Architecture
How to Connect Meta & Google Ads to Salesforce for Closed-Loop Attribution
Salesforce

How to Connect Meta & Google Ads to Salesforce for Closed-Loop Attribution

SkySync

Closed-loop attribution isn't a connector you install. It's an identity problem dressed up as a reporting problem. Here's how to actually wire Meta and Google Ads to Salesforce so the loop closes both ways.


Someone clicks a Meta ad on Tuesday, fills a form on Thursday from a different browser, takes a call from sales, and closes for a five-figure deal six weeks later. Your ad platform reports a lead. Your CRM reports a won deal. Nothing ties the two together. That gap — between the click that cost you money and the revenue that justified it — is the entire job of closed-loop attribution, and most stacks never actually close it.

Most teams reach for a connector, watch two boxes turn green, and assume the loop is closed. It isn't. Closed-loop attribution is an identity problem wearing a reporting costume. The connector moves rows; it does not tell you that the anonymous click and the named opportunity are the same human. This post is about building the loop that actually closes — both directions — on Salesforce, and being honest about where it leaks.

"Closed-loop" means two loops, and people only build one

  • Inbound (the reporting loop): ad-click context — campaign, ad set, keyword, click ID — has to ride along with the lead into Salesforce so a closed deal can be traced back to the spend that created it.
  • Outbound (the optimization loop): the offline conversion — the actual won opportunity and its dollar value — has to be pushed back to Meta and Google so their bidding models learn what a good lead looks like.
  • Most builds do the inbound half, ship a tidy source-of-revenue dashboard, and stop. The outbound half is where the money is, because that's what makes the ad platforms spend your budget on people who convert instead of people who fill forms.

The two flows have completely different mechanics and failure modes, and conflating them is the first mistake. Close only the reporting loop and you get better hindsight. Close the optimization loop and the ad platforms get smarter every week. Decide up front you're building both, because the architecture differs and retrofitting the second one later usually means re-plumbing the first.

The click ID is the whole game — protect it like one

Everything downstream hinges on one fragile token: the click identifier. Google calls it GCLID, with GBRAID and WBRAID covering iOS app journeys; Meta passes fbclid in the URL and, server-side, the fbc and fbp cookies. That string is the only durable thread tying an anonymous ad click to a named person who later becomes an opportunity. Lose it and no connector on earth can reconstruct attribution — it's gone.

And teams lose it constantly. The click ID lands in the landing-page URL, but the form sits on a different domain, or behind a redirect that strips query params, or the visitor wanders three pages before converting and the param falls off. The most common cause of "our attribution is broken" is not the Salesforce side at all — it's that the click ID never survived to the form submit. Capture it on first page load into a first-party cookie or hidden field, persist it across the session, and write it onto the Lead as a real field. Audit this before you build anything fancier, because if this link leaks, everything above it is decorating a void.

No connector can reconstruct an attribution chain whose first link was never captured. The click ID is link one, and it's the one teams quietly drop.

Where identity resolution actually does the work

Here's the part the connector docs gloss over. The click ID gets you from ad to Lead. It does not get you from that Lead to the same human's other touches — the form they filled last month, the webinar they registered for, the existing Contact your AE has been working for a quarter. Real buyers are fragmented across cookies, devices, and email addresses, and the deal often closes on a record that has no click ID on it at all, because a salesperson created it by hand.

This is where you need a real identity layer, not a VLOOKUP. In a Salesforce context that means Data Cloud doing identity resolution: unifying the ad-sourced Lead, the existing Contact, the marketing touches, and the won Opportunity into one resolved person, so revenue can be attributed back to a click that landed on a different record entirely. Without unification, multi-touch attribution is fiction — you're crediting the last form, not the journey. Get the identity graph trustworthy first; the attribution math is a query on top of it, not a substitute for it.

Pick your pipe deliberately, not by default

There are three real ways to move conversions back to the ad platforms, and the choice is an architecture decision with consequences, not a checkbox.

  • Native conversion import — Google Ads offline conversion import and Meta offline conversions, fed click ID plus value. Lowest friction, fewest moving parts, fine for many teams. The constraint is the match window: Google typically won't accept a conversion tied to a click older than 90 days, and B2B sales cycles routinely blow past that.
  • Server-side — Meta's Conversions API and Google's enhanced conversions. More durable than browser pixels, survives ad blockers and cookie loss, and lets you send hashed first-party identifiers (email, phone) as a fallback when the click ID is missing. This is where serious builds land.
  • A middle layer — Data Cloud activation, or a CDP/iPaaS. You resolve identity and compute the attributed value once, then activate to both platforms from a single source of truth. More to stand up, but you stop maintaining two conversion definitions that quietly drift apart.

The trap is mixing them without noticing. A pixel firing a 'Lead' event on form submit plus an offline import firing a 'Lead' event on qualification means you're either double-counting or fighting yourself in the bidding. Define each conversion event once, decide which pipe owns it, and write that down where the next engineer will find it.

Send the value that matters, not the value that's easy

The single highest-leverage decision in the whole build: what value do you push back as the conversion? The easy answer is the form fill, which is why most teams ship it. But if you optimize Meta and Google toward form fills, they will reliably deliver cheap form fills — your sales team drowns in junk while your cost-per-lead chart looks fantastic. The platform did exactly what you asked; you asked for the wrong thing.

Push the qualified opportunity, or the won revenue, back as the conversion instead. Now the bidding models optimize toward leads that become pipeline, not the ones easiest to harvest. The catch is latency: a deal that closes in six weeks is past Google's click-match window. The pragmatic pattern is a staged signal — fire a lighter conversion at qualification, inside the window, with a value that reflects expected pipeline, then update or supplement with closed-won value when it lands. You are teaching the algorithm, and you teach it with the signal you send, not the dashboard you read.

Instrument the leaks, because there will be leaks

Attribution is never 100% matched, and anyone who tells you otherwise is selling something. Privacy changes, cookie loss, cross-device journeys, and offline conversations all guarantee a gap. The goal isn't a perfect number; it's a known, stable, defensible one. So measure your own pipeline the way you'd measure any production system — with metrics you check, not a number you hope holds.

  • Click-ID capture rate — of inbound ad leads, what share arrived with a usable click ID? This is the ceiling on your deterministic match, so track it as a first-class metric.
  • Match rate on push-back — of conversions you send to Google and Meta, what share do they accept and attribute? A sudden drop usually means a window expiry or a hashing-format change, not a sales slump.
  • Time-to-conversion distribution — if most deals close past the match window, native import alone will systematically under-credit your best campaigns. Know this before you cut their budget.
  • Modeled vs. observed — be explicit about how much reported attribution is deterministic (click ID matched) versus platform-modeled. Don't let modeled conversions launder into 'tracked' in the exec deck.

A build order that closes the loop without lying to you

If you take one thing, take the sequence — most broken attribution stacks had the right pieces assembled in the wrong order. Capture the click ID first. Resolve identity second. Define conversion events once, third. Push qualified value back, fourth. Instrument the match rates underneath all of it. Prove the click ID survives to the Lead before you touch Data Cloud. Get unification trustworthy before you compute multi-touch credit. Decide what a 'conversion' means before you wire a single pipe. Each step is cheap to verify and expensive to skip.

Done this way, closed-loop attribution stops being a dashboard you squint at and becomes a system you can reason about — one that makes ad spend measurably smarter every week and that you can tie a number to. That last part is the only honest reason to build it. It's also the line we hold on engagements: we don't just stand the loop up and hand over the keys, we run it and stay accountable for the return it produces.

Want a second set of eyes on your attribution architecture before you build it? Book a working session and we'll map the loop against your real funnel — click ID to closed-won.