Closed-loop attribution

How to Connect Ad Spend to Closed Won Revenue in Your CRM

Write click IDs and UTMs into CRM fields, bring spend into HubSpot or Salesforce, and send deal stages back to Google, Meta and LinkedIn inside their limits.

On this page

Connecting marketing spend to CRM closed won revenue for attribution takes three joins, and a setup missing any one of them leaves the loop open. The ad click has to land in a CRM field at form submission. The spend has to sit somewhere the CRM can divide by. Then the stage changes have to travel back to Google Ads, Meta and LinkedIn before each platform's clock runs out, or the bidding systems keep optimizing toward form fills while sales closes deals the platforms never see.

The quickest way to find where a setup breaks is to follow one record through it. Take a hypothetical demo request from a Google search ad that becomes an opportunity on day 21 and a $24,000 closed won deal on day 70 after the click. Every figure attached to this deal, and to the quarter further down, is an assumption made for illustration.

Capture the click before the form forgets it

An identifier that is not written to the CRM when the form is submitted is very hard to recover later. Google assigns a unique Google Click ID (GCLID) to every click that reaches your site from an ad, and Google Ads Help tells advertisers to save those IDs along with the lead information they collect. Google's Salesforce setup guide on Google Ads Help gets specific: auto-tagging switched on, plus a custom field named GCLID on both the Lead and Opportunity objects, 255 characters long and read-only. The opportunity copy matters most, because the opportunity is the record that reaches Closed Won.

HubSpot keeps the same thing in a contact property. Per the HubSpot Knowledge Base, a contact can sync to Google Ads when its Google Ad click id property holds a value, or when contact data such as an email address is shared, which HubSpot hashes with SHA-256 before it leaves. HubSpot's own ad reporting is fussier about the click. Auto-tracking has to be on, it applies only to future clicks, and with manual UTMs alone HubSpot may identify the traffic source without tying the contact to a specific ad, according to the HubSpot Knowledge Base.

Meta and LinkedIn match on other keys. Meta for Developers recommends keeping the 15 to 17 digit Meta Lead ID in the CRM for best results. LinkedIn's API reference on Microsoft Learn accepts a SHA-256 hashed email, a lead gen form response, LinkedIn's first-party ads tracking ID and several other identifiers. Six fields cover all three platforms.

CRM fieldFilled byRead by
GCLID, on lead and opportunityGoogle auto-tagging, saved through a hidden form fieldGoogle offline import
UTM source, medium and campaignThe landing page URL, built to one convention (a UTM builder helps)Your spend join and channel reports
Meta Lead IDLead Ads instant form syncMeta Conversions API for CRM
LinkedIn lead gen form responseLead Gen Form sync to the CRMLinkedIn Conversions API
EmailThe formAll three platforms, as a hashed match key
Stage change timestampsField history on Stage and Lead StatusThe event time each platform checks

Google's Salesforce guide also asks for field history tracking on the opportunity Stage and the lead's Lead Status, and every route back depends on knowing when a stage changed.

Where does the spend live?

HubSpot brings spend in once the ad accounts are connected. The Amount Spent figure in its ads tool comes from the ad network, per the HubSpot Knowledge Base, and HubSpot divides it by attributed contacts for cost per contact. Marketing Hub Professional and Enterprise add cost per deal (spend divided by Closed Won deals associated with attributed contacts), revenue from deals and an ROI figure whose calculation follows the option chosen in HubSpot Ads settings.

Those deal metrics carry conditions that drop revenue without warning. A deal counts toward an ad only when its stage is Closed Won, it is associated with an attributed contact, that contact sits in HubSpot's default Customer lifecycle stage, and the Close date falls on or after the start of the report's date range. A portal that moved customers into a custom lifecycle stage loses those deals from ad reporting. Free CRM and Marketing Hub Starter accounts also get only the Last ad interaction report. When HubSpot's ad revenue looks low next to the closed won number your sales leader quotes, check those four conditions before anything else.

Salesforce takes more assembly. The pattern we recommend is a monthly spend import keyed by channel and UTM campaign, stored where reports can join it to the opportunities carrying the same campaign value. That join breaks silently when the ad account calls a campaign one thing and the UTM calls it another, so naming discipline does more for this report than any dashboard tool. Many of the lead status and lifecycle stage changes in question are written by your marketing automation workflows, so the people who own those workflows should own the naming too.

How do revenue stages get back to the ad platforms?

Each platform documents its own route back, its own identifier and its own limit on how old an event may be. Those limits decide which stages you send.

Google Ads. For advertisers who have not adopted offline conversion import yet, Google Ads Help recommends starting with enhanced conversions for leads. The Salesforce integration supports either user-provided data such as email or the GCLID as the join key, recommends the lead's email address as a highly unique identifier, and should be set to run on a daily schedule. A conversion action can be as narrow as the opportunity Stage becoming Closed Won, with its value mapped from any Salesforce value field; if no field is mapped, the value defaults to one. For the GCLID import route, the guide adds that conversions uploaded more than 90 days after the associated last click are not imported. On the HubSpot side, the HubSpot Knowledge Base says native lifecycle stage events use a fixed value, the Use the Deal amount option is no longer available, actual deal amounts need a custom developer build, and only stage changes made after the conversion event is created count.

Meta. The Meta for Developers page on the Conversions API for CRM ties it to the Conversion Leads performance goal, which is currently only compatible with Facebook and Instagram Lead Ads instant forms. It asks for uploads at least once a day and wants the stage you optimize for to occur within 28 days of lead generation. The general Meta for Developers guide adds the rule that shapes the build: an event_time can be up to 7 days before you send the event, and a single older event gets the entire request rejected. A quarter-end batch of closed won deals fails on that rule.

LinkedIn. LinkedIn Marketing Solutions Help lists Conversions API setup guides for HubSpot and Salesforce Data 360, with Salesforce and Dynamics 365 also reachable via Zapier, and says the data is deleted after 180 days. The API reference on Microsoft Learn rejects conversion timestamps older than 90 days and offers post-click windows of 1, 7, 28, 30 or 90 days, with 180 and 365 supported for lead, qualified lead, purchase and a few other types. Marketing qualified lead and sales qualified lead conversion types are available from the 202608 API version onward.

PlatformDocumented routeAge limitStages worth sending
Google AdsEnhanced conversions for leads or GCLID import; native Salesforce and HubSpot syncs90 days after the last click (Salesforce GCLID import)Opportunity created, then Closed Won
MetaConversions API for CRM, Lead Ads instant formsEvent time up to 7 days before sendingEach stage as it happens
LinkedInConversions API, direct or through a partnerConversion time within the past 90 daysSales qualified lead, then Closed Won

Our hypothetical deal closes on day 70, inside the 90 days Google's GCLID import allows, so the closed won upload counts and can carry its $24,000 value if a Salesforce value field is mapped. Had it closed on day 120, the opportunity created on day 21 would be the last event Google could still take from that click, which is why the earlier stage goes up too.

What should a closed-loop dashboard show?

A closed-loop reporting dashboard from ad spend to closed revenue in the CRM needs four numbers per channel: spend, opportunities, pipeline and closed won, with each of the last three set against spend. Lead counts can live on a separate tab. The table below is a hypothetical B2B quarter, and every figure in it is an assumption.

Channel (hypothetical)SpendOpportunitiesCost per opportunityPipelinePipeline per $1Closed won so farClosed won per $1
Google Ads$30,00025$1,200$375,000$12.50$90,000$3.00
LinkedIn$24,00012$2,000$336,000$14.00$28,000$1.17
Meta$9,0005$1,800$45,000$5.00$18,000$2.00
Total$63,00042$1,500$756,000$12.00$136,000$2.16

The LinkedIn row tells two stories at once. It has the highest cost per opportunity at $2,000 and the most pipeline per dollar at $14.00, because its average opportunity ($28,000) is nearly twice the size of Google's ($15,000). Its closed won column is thin because only one of its 12 opportunities closed inside the quarter. Budgeting on closed won alone, or on cost per opportunity alone, would cut the channel producing the largest deals. Meta, at $5.00 of pipeline per dollar, is the row to question next quarter, after confirming its website-form leads carry UTMs as reliably as its instant form leads.

The weekly read of a table like this is routine work for an assistant, and we describe one working setup for reporting with Claude. Anything that writes stage events to ad platforms on its own needs a named owner and an alert when a sync fails, the same controls laid out in our governance operating model for marketing agents. To price an automated build against analyst hours, the AI ROI calculator is a further resource.

When a deal closes after every window

Deals that close on day 200 still belong on the dashboard, because the dashboard joins on CRM fields and has no clock. The ad platforms are where they get harder to use. Google's Salesforce integration will not import them through GCLID import, because they land more than 90 days after the last click. LinkedIn can still take the event if it is sent within 90 days of closing and the conversion rule uses a 365 day post-click window, which its API supports for lead, qualified lead and purchase types. Meta will accept the event inside its 7-day sending limit, though its Conversion Leads guidance wants the optimized stage within 28 days of the lead. For the bidding systems, the dependable signal is the earliest stage that reliably predicts revenue, checked against closed won every quarter. Choosing and validating that stage for nine-month cycles is the subject of our separate piece on long B2B sales cycle measurement. For teams that want the syncs built and watched for them, our agentic AI automation practice is a further resource.

Sources

Frequently asked questions

Which CRM fields do I need to tie ad spend to closed won revenue?
At minimum, a GCLID field on both the lead and the opportunity in Salesforce (or HubSpot's Google Ad click id property), UTM source, medium and campaign, the Meta Lead ID for instant form leads, the LinkedIn lead gen form response, the contact's email, and a timestamp for each stage change. Write them when the form is submitted, because click details are very hard to recover later.
Can HubSpot send the deal amount to Google Ads?
Not through the native lifecycle stage sync. HubSpot's help center says those events use a fixed value and the Use the Deal amount option is no longer available, so actual deal amounts need a custom setup built by a developer. Google's own Salesforce integration can map a Salesforce value field instead, and it uses a value of one when nothing is mapped.
How old can an offline conversion be when I upload it?
Each platform sets its own limit. Google's Salesforce integration, on its GCLID import route, does not import conversions uploaded more than 90 days after the associated last click. Meta accepts an event_time up to 7 days before you send it and rejects the whole request if one event is older. LinkedIn's Conversions API rejects conversion timestamps older than 90 days. Send each stage as it happens.
Why does HubSpot show less ad revenue than our closed won report?
HubSpot counts a deal toward an ad only when it is Closed Won, associated with an attributed contact in the default Customer lifecycle stage, and closed on or after the start of the report's date range. Deals whose contacts sit in a custom lifecycle stage are excluded, auto-tracking covers only clicks after it was switched on, and Free and Starter accounts see only the Last ad interaction report.
Should a closed-loop dashboard rank channels on pipeline or closed won?
Show both against spend, next to cost per opportunity. In our hypothetical quarter, LinkedIn had the highest cost per opportunity at $2,000 and the most pipeline per dollar at $14.00, while its closed won figure lagged because only one of its 12 opportunities had closed. Ranking on closed won alone, or on cost per opportunity alone, would have cut the channel bringing the largest deals.

Free tools for this topic

CALCULATORROAS & Break-Even CalculatorKnow the ROAS you actually need before you scale.FREE TOOLCompetitor Ad ExplorerSee every ad your competitor is running right now.CALCULATORMedia Mix PlannerSplit any budget across channels with live projections.

Keep reading

GlossaryWhat Is Marketing Automation in the AI Era?Read →AI & MLA Working Setup for Claude Across Research, Ad Accounts and ReportingRead →AI & MLThe Governance Operating Model That Lets Marketing Agents Ship Work AloneRead →
CATALIST NEWSLETTER

Monthly dose of growth marketing.

Get marketing tips, narratives, guides, and playbooks delivered to your inbox.

Protected by reCAPTCHA — Google's Privacy Policy and Terms of Service apply.