Skip to content
home

Data and analytics engineering · 2 min read

Joining CRM and marketing data without double counting

Capture the right IDs, join on them, and count each sale once.

By WebIQ Analytics · 1 October 2026

For lead generation and B2B businesses, the outcome that matters often lives in the CRM: qualified leads, opportunities, closed revenue. Joining it to marketing data is how you see what marketing actually delivered. Done carelessly, it's also how revenue gets counted two or three times.

Capture IDs at the start

When someone submits a form, store with the lead:

  • The click IDs present on the landing page (for example gclid, msclkid, fbclid)
  • UTM parameters from the landing URL
  • The analytics client or user ID, where consent allows
  • The landing page and timestamp

Without these, the CRM record can't be linked back to the visit that created it.

From ad click to closed revenue, joined on stable IDs.Ad clickgclid, fbclid or UTMscapturedLead formlead ID + click IDsstoredCRMlead, opportunity,accountClosed dealrevenue, date, lead IDReporting tableone row per deal,deduplicatedJoin on stable IDs (lead and deal IDs), not names or emails. Count each deal once, then allocate it, rather than summingevery channel's own claim.Illustrative flow; IDs and systems vary.
From ad click to closed revenue, joined on stable IDs.

Join on stable keys

Join marketing data to CRM records on lead, opportunity and account IDs, not names or email addresses, which change and duplicate. Keep a clear chain: click to lead, lead to opportunity, opportunity to closed deal.

Count each sale once

The most common error: each channel claims the deal through its own attribution, and the claims are summed. A deal influenced by search, social and email becomes three deals.

Instead:

  1. Build a table with one row per closed deal.
  2. Decide how credit is allocated (first touch, last touch, or a rule), and apply it once.
  3. Report channel totals that add up to actual revenue.

For budget decisions, use a mix model or test on the deduplicated outcomes rather than any attribution rule.

Allow for time lags

B2B deals close weeks or months after the first touch. Report pipeline and revenue by the date of the original lead as well as the close date, and give recent periods time to mature before judging them.

Send outcomes back to platforms

Offline conversion imports let ad platforms optimise towards qualified leads or revenue rather than form fills. Send them from the same deduplicated table, so platforms and reports agree.

Done well, the join shows which marketing produces revenue, not just enquiries.

The data foundations your measurement depends on

No model is better than the data under it. We build the weekly, validated dataset your mix models, tests and dashboards need, and keep it trustworthy.