Building An Attribution Engine: The Complete UTM Playbook For B2B
A practical deep dive into UTM parameters and attribution that actually works. Learn how to implement session-based UTM tracking, set up hidden fields and workflows for first/last touch, backfill legacy records, and standardise UTMs and naming conventions across LinkedIn, Meta, and Google Ads.
We show how to map UTMs from contacts to deals, build useful CRM dashboards, and pair machine-reported data with self-reported attribution to capture dark social, including a real example where SRA revealed paid social as the true driver behind “organic/direct” deals.
Transcript
Unqualified Leads – Episode 007 Highlights
Hosts: Harry Hughes & Daniel
Topic: How to use UTM parameters for attribution in B2B / high‑ticket lead gen, why they matter, and a playbook for setting them up and using them.
Testing Structure & Creative Strategy
Why UTMs Matter
UTMs provide a source of attribution outside platform‑native attribution (e.g., inside HubSpot or ad‑platform dashboards). Without UTMs, you’re often forced to rely on first‑touch or generic “direct/organic” buckets which may be misleading.
UTMs allow you to “click into a contact or deal in your CRM and trace it all the way back to the campaign, the keyword or ad” as the host says.
Platform native attribution tends to be biased (toward the platform doing the reporting). UTMs give you a more neutral, more comprehensive layer of data.
Properly captured UTM data becomes part of your own source of truth (not perfect, but better than just ad‑platform data).
If UTMs are not captured correctly, you lose insight into how leads entered your funnel, especially in longer purchase cycles where the user may click, roam, bounce, return later, etc.
The host emphasises: “we store the UTM parameters at the session level so we don’t lose them if the user navigates away and returns later” (rather than only capturing UTMs at the form submit moment), this addresses a common issue.
Using UTMs allows you to capture:
First touch (how they entered the database)
Last touch (what triggered the conversion)
(Optional) Conversion‑touch (what event moved them to SQL)
They also emphasise: No one data source is perfect , UTMs, self‑reported attribution, and platform attribution each give insight, and together they provide a fuller picture.
UTM Playbook & Setup
1. Taxonomy & Governance
Create a master sheet (or document) listing all approved UTM values (source, medium, campaign, content, term) so everyone uses the same.
Consistency is key: lower‐case, underscores instead of spaces, no random values. This aligns with best practices.
For example: utm_source=linkedin, utm_medium=paid_social, utm_campaign=webinar_q3 etc.
The host notes: “you don’t want one campaign using ‘paid social’ and another using ‘paid_social’ or ‘social‑cpc’, you’ll fragment your data”.
2. Hidden Fields on Forms
Every landing/form on your site should include hidden fields for the UTM parameters (at minimum: source, medium, campaign, content, term).
Use JavaScript (or similar) to:
Capture UTM parameters when the user lands (and store them in local storage or cookie) so they persist across navigation.
When the user submits the form, inject those UTM values into the hidden fields so they are passed into your CRM.
This prevents loss of UTM data when users click, browse, return and then submit later.
3. Session‑Based UTM Capture
Rather than only capturing UTMs at the time of form submit, you need to persist them across the session. The host describes: “When they click the ad/URL we capture UTMs, then if they browse multiple pages or come back later, we still have them.”
Also use fallback logic: if no UTM source is captured, set a default like “not_provided” so you don’t end up with blank fields.
4. First / Last / Conversion Touch Logic
The host sets up three layers of attribution fields:
First_utm_*: the very first UTM values when the contact entered the database. These are locked and do not overwrite.
Last_utm_*: the UTM values for the last conversion moment (e.g., demo booked or form submit).
(Optional) Conversion_utm_*: for if you want to capture the UTM from when the lead became an SQL or similar event.
Workflow logic in your CRM ensures: if the First fields are empty, populate them; if First exists then populate Last; etc.
Also emphasised: Need to back‑fill existing contacts (pre‑system setup) so your historical data isn’t skewed.
5. Platform‑Level UTM Enforcement
In your paid platforms (Google Ads, LinkedIn, Meta etc) make sure the UTM parameters are appended automatically (use dynamic values where possible) at account/campaign level so you don’t rely on manual input per link.
Example: utm_source={{site_source_name}}&utm_medium=cpc&utm_campaign={{campaign.name}}&utm_content={{ad.id}}, this helps reduce manual error.
Use dynamic variables to capture things like ad placement, ad id, audience etc.
6. Attribution in CRM / Reporting
Once UTM data flows into your CRM contact and deal records, build dashboards and reports that show:
Contacts by First UTM source/medium/campaign
Contacts by Last UTM source/medium/campaign
Deals (closed revenue) by First/Last UTMs
This allows you to understand: how many leads came via each channel/campaign, how many deals closed, and what pipelines they progressed through.
Self‑reported attribution (asking “How did you hear about us?”) can be used as a complement to UTMs (especially where UTMs aren’t captured) so you can cross‑validate user‑reported sources with system‑captured ones.
7. Best Practices & Common Mistakes
Use lowercase only, no spaces, consistent naming conventions.
Don’t apply UTMs on internal links (links between pages on your own site), that creates false sessions and skews attribution.
Ensure your code stores UTMs early (landing) and persists them until conversion.
Provide fallback values for unknowns (e.g., utm_source=not_provided).
Avoid mixing sources/mediums incorrectly (e.g., using “facebook” for source and also “social” for medium inconsistently).
Backfill historical contacts when you implement this system in an established business.
Final Takeaways
UTMs are not just optional, they’re essential for accurate attribution, especially in longer‑cycle B2B/high‑ticket environments where users don’t convert immediately.
Capturing UTMs properly (session behaviour + hidden form fields + CRM folks) gives you the ability to trace which campaign, which ad, which medium brought a contact in and what ultimately converted them.
Governance and consistency (taxonomies, naming, workflows) are critical, without them the data becomes fragmented and unreliable.
Self‑reported attribution + UTMs + in‑platform attribution each have value, don’t rely on one alone. Use them together.
A robust UTM system helps you trust your data, make better marketing budget decisions, and avoid misleading conclusions (e.g., “all of this came organic/direct” when in fact the journey started with an ad).

