Social media attribution: how to find the post that brought the customer
Trace a CRM contact or deal back to the exact social post or ad: UTM tags, gclid and fbclid, HubSpot original source, matching rules and the usual gaps.
Most teams can say how many clicks a post got. Few can say which post produced the contact who became a customer. This guide shows the whole trail, from the post to the closed deal, and the rules for matching each step.
Social media attribution means linking a CRM contact or deal to the specific post or ad that first brought that person to your site. It works when every link carries a tag unique to its post, your CRM stores the first page a visitor saw, and a matching rule turns that tag back into a post. Everything else in this guide is detail on those three parts.
What does a complete attribution trail look like?
A complete trail has five links: the post, the click, the first page view, the contact record, and the deal. If any one is missing, you can still see that "LinkedIn did something", but not which post. Here is a worked example with the exact values at each step (an illustrative account, not a real customer).
| Step | What happens | What gets stored |
|---|---|---|
| 1. Post | A LinkedIn post goes out Tuesday 9:00 with a link to a blog article | https://example.com/blog/quarter-review?utm_source=linkedin&utm_medium=social&utm_campaign=tracee-3f9a1c2e |
| 2. Click | A reader clicks from her phone | The URL above, with all three tags |
| 3. First page view | Your HubSpot tracking code runs and sets its visitor cookie | First page seen = the tagged URL; visitor cookie hubspotutk |
| 4. Contact | Six days later she returns directly and books a demo | Contact created; Original traffic source = Organic social, drill-down 1 = LinkedIn, drill-down 2 = tracee-3f9a1c2e |
| 5. Deal | Sales opens a deal and associates her contact | The deal mirrors the contact's original source |
Step 4 is where most trails break or hold. HubSpot passes the hubspotutk cookie "to HubSpot on form submission", and that cookie lasts six months, according to HubSpot's cookie documentation (updated September 2026). So the second visit can be direct and the contact still inherits the first, tagged visit.
Step 5 is automatic in HubSpot: "Companies and deals associated with contacts mirror these properties," per HubSpot's traffic source article (updated August 2026).
How do UTM parameters tie a post to a contact?
UTM parameters are labels you append to a link so analytics tools and CRMs know where a visit came from. Google's UTM documentation says you "should always use utm_source, utm_medium, and utm_campaign", and that values are case sensitive.
For post-level attribution, the important choice is what goes in utm_campaign. If every LinkedIn post shares utm_campaign=q4-content, the CRM can tell you the contact came from the Q4 content push on LinkedIn, but not from which of the 40 posts. Give each post its own value and the question answers itself.
Three rules keep the tag useful:
- One value per post. A short ID works better than a long description, because nobody retypes it and it never collides.
- Medium says organic or paid. Use
socialfor organic posts and something likepaid_socialorcpcfor ads. HubSpot and GA4 both read the medium to decide which bucket a visit belongs in. - Source is the network, lowercase.
linkedin, notLinkedInorli. Google treatsgoogleandGoogleas different values.
Our UTM guide for social posts has a naming table per network and copyable templates.
What do click IDs like gclid and fbclid add?
Click IDs are identifiers that ad platforms append to a link automatically when someone clicks an ad. Google Ads adds gclid ("Google Click Identifier") when auto-tagging is on, as Google's auto-tagging help explains. Meta adds fbclid to clicks from Facebook and Instagram, described in Meta's ClickID documentation.
A click ID tells you, with certainty, that the visit came from that ad platform. It is the best evidence you have when someone forgot the UTM tags on an ad. What it doesn't do on its own is name the campaign in your CRM. Resolving a gclid to a campaign takes a further report call to Google Ads, and an fbclid can't be looked up through Meta's reporting at all.
Two details matter in practice:
- In GA4, "auto-tagging is prioritized over manual tagging due to the absence of an override option" (same Google page). If a Google ad carries both a gclid and your own UTMs, GA4 reports the gclid's values.
- HubSpot treats a valid
gclidon the first URL as Paid search, per its source bucketing rules (updated August 2026). That article doesn't listfbclid, so Meta clicks rely on your UTM tags to be bucketed correctly.
What is HubSpot's original source, and when should you trust it?
Original traffic source is "the first known web source through which a contact interacted with your business," in HubSpot's words. It comes with two drill-downs that HubSpot sets automatically and that "cannot be updated manually" (HubSpot).
For social visits, the drill-downs are the most useful fields you have:
| Original source | Drill-down 1 | Drill-down 2 |
|---|---|---|
| Organic social | Social media site | Campaign name from utm_campaign |
| Paid social | Social media site | Campaign name from utm_campaign |
| Paid search | Campaign name from utm_campaign | Search term, if available |
| Other campaigns | Campaign name from utm_campaign | Source / Medium |
Trust it when the contact's first visit was tagged and tracked. Treat it with care in three cases: the contact was imported or created by sales (it shows Offline sources, and HubSpot now recommends the Record source property for those), the visitor blocked tracking cookies (HubSpot notes ad blockers can affect these values), or the contact first visited long before the campaign you're measuring.
The HubSpot social attribution guide covers the HubSpot side step by step.
Why do platform-reported conversions disagree with your CRM?
Platform numbers and CRM numbers answer different questions, so they will never match exactly. The platform asks "did this person interact with my ad within my window before converting?" The CRM asks "where did this person come from the first time?"
The gap usually comes from four places:
- View-through credit. Platforms can count people who saw an ad and converted later without clicking. LinkedIn's Conversions API documents defaults of a 30-day post-click window and a 7-day view-through window (Microsoft Learn, LinkedIn Conversions API). Your CRM never sees a view.
- Different models. LinkedIn states it uses "the last-touch attribution model" for most conversion types (LinkedIn Help). HubSpot's original source is first touch.
- Double claiming. A person who saw a Meta ad, clicked a LinkedIn post and then searched your brand on Google can be a conversion in all three dashboards and one contact in your CRM.
- Lost tags. Redirects, link shorteners, in-app browsers and consent banners can strip parameters or block the tracking cookie before the form.
The practical fix is to stop expecting agreement and track the ratio instead. Put each platform's reported conversions next to the CRM contacts you could match to that platform for the same period. A stable ratio is fine. A ratio that drops suddenly usually means a tag broke.
How should the matching logic work?
A matching rule should be deterministic and conservative: credit a contact only when exactly one post or campaign fits, and record a reason when none does. A confident wrong answer does more damage than an honest "unmatched".
Run the checks in this order and stop at the first hit:
- Unique post tag. If
utm_campaignequals a tag you issued to one post, credit that post. - Campaign name or ID. If
utm_campaignequals an ad campaign's ID or name, credit that campaign. Normalize both sides first (lowercase, strip spaces and punctuation), and useutm_sourceto narrow the platform. - CRM paid-source detail. If the CRM classified the visit as paid and its drill-down names a campaign, credit that campaign.
- Ambiguity check. If two campaigns on different platforms share a name, mark the contact ambiguous rather than guessing.
- Unmatched, with a reason. No source at all, a tag that matches nothing, or an ambiguous name. Each reason points to a different fix.
Keep the click ID as supporting evidence even when you can't resolve it, since it tells you which platform to investigate.
What are the common gaps, and how do you fix them?
Most unmatched contacts fall into a handful of patterns, and each has a specific fix.
| Gap | What you see | Fix |
|---|---|---|
| Link had no tags (bio link, first comment, link sticker) | Original source = Organic social or Referrals, drill-down 2 empty | Tag every link you post, including comments and bios |
| Redirect or shortener dropped the query string | Source = Direct traffic | Click your own link before publishing and check the address bar |
| Form on another domain (scheduler, embedded form) | Contact created with no web source | Pass the visitor cookie or hidden UTM fields into the form |
| Mixed case or typos in UTMs | Two rows for one campaign, or no match | Lowercase everything; generate tags, don't type them |
utm_medium HubSpot doesn't recognize | Bucketed as Other campaigns | Use social for organic and paid or cpc for ads |
| Contact imported or created by sales | Offline sources | Record the channel in Record source or a "How did you hear about us" field |
| Person switched devices | Later source, or none | Accept the loss; ask on the form for high-value deals |
The last row has no technical fix. A self-reported field on the demo form catches what tracking misses, and the two together give a fuller picture than either alone.
How does Tracee handle this?
Tracee tags every link in a post it publishes with utm_source set to the network, utm_medium=social, and a utm_campaign unique to that post, in the form tracee- plus eight characters. It replaces any old UTM values already on the link, so a stale tag can't send the lead to the wrong campaign.
Tracee then reads each HubSpot contact's first URL, UTM values, click IDs and original source, and matches it in the order described above: its own post tags first, then ad campaign names or IDs, then HubSpot's paid source detail. Contacts it can't match are listed with the reason. Tracking health puts each ad platform's reported conversions next to the contacts matched to it, with a match rate. Salesforce and Pipedrive connect through the connector layer, and ad accounts are read-only. The features page shows the attribution and tracking health views.
Next step
Pick last month's five newest customers in your CRM and try to trace each one back to a post by hand, using the drill-down fields above. Where the trail breaks, the gap table tells you what to change in your tagging. If you'd rather have every post tagged and matched for you, Tracee does it on every plan; see pricing for the current plans (at the time of writing, November 2026).
Frequently asked questions
Can you track which organic social post generated a lead?
Yes, if the link in the post carries a tag that is unique to that post, usually a distinct utm_campaign value. When the person lands on your site, your CRM's tracking code stores the first URL. When they later fill in a form, the CRM ties that URL to the new contact, and the tag points back to the exact post. Without a unique tag, you only learn the network.
Why does Meta or LinkedIn report more leads than my CRM?
Ad platforms count conversions inside their own attribution windows, and some include people who only saw an ad. LinkedIn's default, for example, is a 30-day click and 7-day view window. Several platforms can also claim the same person. Your CRM records one original source per contact, so its total is lower and closer to what actually happened.
What is the difference between UTM parameters and click IDs?
UTM parameters are labels you add to a link yourself (source, medium, campaign), so they say whatever you named them. Click IDs such as gclid and fbclid are added automatically by Google and Meta on ad clicks. A click ID proves the visit came from that ad platform, but on its own it doesn't tell your CRM which post or campaign it was.
How long after a click can a contact still be attributed?
It depends on the cookie. HubSpot's visitor cookies expire after six months, so a person who clicks a post and converts within that time on the same browser keeps the original source. Clearing cookies, switching devices or blocking trackers breaks the link, and the contact then shows a later or unknown source.
Do I need multi-touch attribution to know which post worked?
Not to start. First-touch attribution, the post or ad that brought the person to your site the first time, answers most questions for a small B2B team. HubSpot's multi-touch deal and revenue attribution reports need Marketing Hub Enterprise as of November 2026. Get the first-touch data clean first, since every model depends on the same tags.