Attribution
Sign up free
B2B

Salesforce and Ad Platforms: Closing the Loop on Lead Attribution

Blog B2B Salesforce and Ad Platforms: Closing the Loop on Lead Attribution
Abdul Kayium
Abdul Kayium
Tracking & attribution consultant
8 min read

The deal closed in Salesforce four months after the original ad click. Salesforce knows it closed. Google Ads has no idea it happened, has never heard of it, and is still optimizing bidding toward whatever signal it could actually see back when the click occurred — usually just a form fill.

Why this gap exists by default

Ad platforms and CRMs are separate systems that don't talk to each other unless something specific connects them. Google Ads sees a click and, at best, a form submission shortly after. Salesforce sees a lead record that, over the following weeks or months, moves through qualification, opportunity stages, and eventually closes — entirely inside its own system, invisible to the ad platform that originally generated it.

How the connection actually gets built

  1. 01Capture the click ID at lead capture. When a visitor clicks a Google or Meta ad, the URL carries a click identifier (gclid, fbclid) — see GCLID and FBCLID explained. Capture this value in a hidden form field and store it on the resulting Salesforce Lead record.
  2. 02Track the lead through Salesforce's own stages. Lead → Marketing Qualified Lead → Opportunity → Closed Won, each with a timestamp, gives you the full lifecycle the ad platform can't see on its own.
  3. 03Send qualified-stage events back to the ad platform, matched by the stored click ID, using each platform's offline conversion import mechanism — see offline conversion tracking for how that import actually works.

How this typically gets implemented

What this actually changes
Once qualified-lead or closed-won data flows back to Google Ads or Meta, their bidding algorithms can start distinguishing between campaigns generating real pipeline and campaigns generating high volumes of leads that never go anywhere — often revealing they're not the same campaigns.

If you use HubSpot instead of Salesforce

The underlying mechanics are identical regardless of CRM — capture the click ID, track the lead through defined stages, send qualified outcomes back. See HubSpot attribution reporting for the HubSpot-specific version of this same loop, and B2B attribution for the broader picture this connects to.

Frequently asked questions

How do I connect a Salesforce closed-won deal back to the original ad click?
Capture the ad platform's click ID (gclid for Google, fbclid for Meta) at the point of lead capture, store it on the Salesforce Lead record, and use that stored ID to match the eventual qualified or closed-won outcome when sending it back to the ad platform's offline conversion import.
Do I need custom development to connect Salesforce to Google Ads?
Not necessarily — both Google Ads and Meta offer native or AppExchange-listed integrations for common cases. Custom stage definitions or less standard workflows may need a Salesforce Flow, scheduled export, or manual CSV upload instead.
What's the simplest way to start sending Salesforce data back to ad platforms?
A manual, periodic CSV export of qualified or closed-won records (matched to stored click IDs) uploaded through the ad platform's offline conversion import interface — no custom integration required, though it doesn't scale as well as an automated connection.
Why does my ad platform only optimize for form fills instead of actual sales?
Because a form fill is usually the only signal the ad platform can see by default — everything after that (qualification, sales cycle, closed revenue) happens inside your CRM, invisible to the ad platform unless that data is explicitly sent back to it.
Written by Abdul Kayium

Conversion tracking and attribution consultant. Spends most days inside Google Tag Manager, GA4, and server-side tracking setups, helping ecommerce and B2B teams figure out where their customers actually came from. More about Abdul →

Related reading

← Back to all articles