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 field | Filled by | Read by |
|---|---|---|
| GCLID, on lead and opportunity | Google auto-tagging, saved through a hidden form field | Google offline import |
| UTM source, medium and campaign | The landing page URL, built to one convention (a UTM builder helps) | Your spend join and channel reports |
| Meta Lead ID | Lead Ads instant form sync | Meta Conversions API for CRM |
| LinkedIn lead gen form response | Lead Gen Form sync to the CRM | LinkedIn Conversions API |
| The form | All three platforms, as a hashed match key | |
| Stage change timestamps | Field history on Stage and Lead Status | The 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.
| Platform | Documented route | Age limit | Stages worth sending |
|---|---|---|---|
| Google Ads | Enhanced conversions for leads or GCLID import; native Salesforce and HubSpot syncs | 90 days after the last click (Salesforce GCLID import) | Opportunity created, then Closed Won |
| Meta | Conversions API for CRM, Lead Ads instant forms | Event time up to 7 days before sending | Each stage as it happens |
| Conversions API, direct or through a partner | Conversion time within the past 90 days | Sales 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) | Spend | Opportunities | Cost per opportunity | Pipeline | Pipeline per $1 | Closed won so far | Closed won per $1 |
|---|---|---|---|---|---|---|---|
| Google Ads | $30,000 | 25 | $1,200 | $375,000 | $12.50 | $90,000 | $3.00 |
| $24,000 | 12 | $2,000 | $336,000 | $14.00 | $28,000 | $1.17 | |
| Meta | $9,000 | 5 | $1,800 | $45,000 | $5.00 | $18,000 | $2.00 |
| Total | $63,000 | 42 | $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
- Google Ads Help: About offline conversion imports
- Google Ads Help: How to set up a Salesforce integration
- HubSpot Knowledge Base: Create and sync ad conversion events with your Google Ads account
- HubSpot Knowledge Base: Ads attribution in HubSpot
- HubSpot Knowledge Base: Analyze ad campaigns in HubSpot
- Meta for Developers: Conversions API for CRM integration
- Meta for Developers: Using the API, Conversions API
- LinkedIn Marketing Solutions Help: LinkedIn Conversions API
- Microsoft Learn: Conversions API (LinkedIn Marketing API)
