Cookie preferences

Choose which optional cookies EndFrame may use on this site. Analytics and advertising tools load only if you allow them, and you can change your mind any time from “Cookie settings” in the footer. Whatever you choose, this tab keeps the campaign labels from the link that brought you, and they are saved with your account if you sign up. Read the Cookie Policy.

Needed for the site to work, such as remembering this choice. Always on.

Lets us load analytics tools through Google Tag Manager, including Google Analytics and Microsoft Clarity session recordings, to understand how the site is used.

Allows advertising tags to measure our ad campaigns. None run on this site today. It also keeps ad click IDs from the page address for this tab, and saves them with your account if you sign up.

Skip to main content

Lead Source Tracking: How to Know Where Every Lead Came From

Your CRM is full of leads marked unknown, website or other. This guide explains which data actually identifies a lead's source, how to capture it on the first visit and keep it until the form is sent, and how to design the fields so sales and marketing can trust the report.

The EndFrame Team6 min read

Sales asks where last month's best leads came from, and the CRM answers with a column of website, direct and unknown. Marketing has campaign reports showing clicks and form fills, but nothing connects a specific lead record to the ad, email or post that produced it. Lead source tracking is the fix: every lead arrives in your CRM already labelled with the channel, campaign and, where possible, the exact ad that brought them in. This guide covers what data identifies a source, how to capture it, and how to store it so the report survives contact with real buyers.

What actually identifies where a lead came from

There are only a handful of signals a browser carries that say where a visitor came from, and each covers a different slice of traffic.

SignalWhere it comes fromWhat it tells you
UTM parametersTags you add to links (utm_source, utm_medium, utm_campaign and so on)Channel, campaign and creative, exactly as you named them
Ad click IDsAdded by ad platforms on click: gclid, fbclid, ttclid, msclkidThat the visit came from a paid click, and lets you report the conversion back to the platform
ReferrerThe Referer header set by the browserThe site that linked to you, when the browser sends it
Landing pageThe first URL the visitor loadedWhich content or offer pulled them in
Self-reported sourceA how did you hear about us questionChannels with no click trail, such as podcasts or word of mouth

UTMs are the backbone because you control them. Click IDs matter because they are what ad platforms use to match a lead back to a click, which is the basis for offline conversion uploads later. The referrer fills gaps for organic search and unpaid links, but browsers often trim it to the domain or drop it, so treat it as a fallback. If your UTM values are inconsistent, fix that first: a UTM naming convention is what turns raw parameters into a report people can read.

Why lead source gets lost between the click and the CRM

The parameters exist on the landing URL. The form is usually somewhere else, sometimes several pages and several days later. Everything that goes wrong happens in that gap.

  • The visitor navigates away from the landing page and the UTMs are no longer in the URL when they reach the form.
  • The visitor leaves and comes back later by typing your address, so the converting session looks direct.
  • A redirect, link shortener or consent banner strips or delays the parameters before anything reads them.
  • The form tool or CRM integration only sends the fields the visitor typed, never the campaign data.
  • An automation or import overwrites the original source with the latest one, so the first touch disappears.

Analytics tools such as GA4 can show you that a campaign produced form submissions in aggregate. What they do not do is write the source onto the individual lead in your CRM. For that you need to carry the data from the landing page to the form yourself.

How to capture lead source step by step

  1. 1Read the landing URL on the first page view. Pull out every UTM parameter, any click IDs and the referrer, plus the landing page path and a timestamp.
  2. 2Store them in first-party storage that survives navigation: a first-party cookie or local storage on your own domain. Session storage is lost when the tab closes, so it only covers single-visit journeys.
  3. 3Keep two copies: first touch, written once and never overwritten, and last touch, updated whenever a new visit arrives with campaign data. A new visit with no campaign data should not overwrite last touch with direct.
  4. 4Add hidden fields to every form for the values you want in the CRM, and populate them from storage just before submission.
  5. 5Map those hidden fields to dedicated properties in your CRM, not to a free-text notes field, so they can be filtered and reported on.
  6. 6Submit a test lead from a tagged link in a private window and check that the CRM record shows every value you expected.

Hidden fields are ordinary form inputs the visitor never sees, and the details of naming, populating and mapping them are covered in our guide to capturing UTM parameters in hidden form fields. The CRM side, including how to stop integrations overwriting original values, is covered in passing UTM parameters to your CRM.

First touch, last touch, or both?

Store both. First touch tells you which channels open new relationships; last touch tells you what finally persuaded someone to raise their hand. For a business with a short path to purchase the two are often the same. For anything considered, they diverge, and choosing one throws away half the story. Keep separate fields such as original source, original campaign, latest source and latest campaign, and decide later how to weight them. Our comparison of first-touch and last-touch attribution explains what each view rewards and where each misleads.

Designing the CRM fields

A short, consistent set of fields beats a long one nobody fills in. A workable minimum is: original source, original medium, original campaign, latest source, latest medium, latest campaign, latest content, landing page, and one field per click ID you buy media on. Add a self-reported source picklist if sales calls are part of your process. Keep the values machine-written wherever possible; a picklist that sales reps fill in from memory will drift within weeks.

Decide up front how a channel label is derived. A simple rule set, for example any medium of cpc or paid_social counts as paid, anything with a referrer from a search engine and no UTMs counts as organic search, and everything else with no data counts as direct, keeps the report consistent month to month. Write the rules down where marketing and sales can both see them.

Channels that leave no click trail

Some leads will always arrive without parameters: someone heard your founder on a podcast, a colleague forwarded a link in a private chat, or a customer recommended you over coffee. Tracking cannot see these, and pretending otherwise inflates direct. Two things help. Use tagged links and vanity URLs anywhere you control the link, including QR codes and show notes, and ask a short open question on high-intent forms. The answers will not be precise, but they show which untracked channels deserve attention.

Checking that it works

Run the same three tests every time you add a form or change a page template. Land from a tagged link, browse two pages, then submit: the lead should carry the original UTMs. Land from a tagged link, close the browser, return by typing the URL and submit: first touch should still show the campaign. Land from a paid click on a real ad: the click ID should be on the record. Build the tagged links with a UTM builder so you know the test link itself is correct. Our guide to tracking form submissions reliably covers the form side of these tests.

Where EndFrame fits

EndFrame's first-party tracker captures UTMs, click IDs and the referrer on arrival, stores them against the visitor, and attaches them to form submissions and conversions automatically. Each lead then carries its source in EndFrame's lead reports, and a custom webhook can send the same record, campaign fields included, to your CRM or warehouse. Whatever tool you use, the principle is the same: capture source on the first visit, keep it until the form is sent, and write it to the lead.

Frequently asked questions

What is the difference between lead source and original source?

Many teams use lead source for the channel that produced the conversion and original source for the channel that first brought the person to the site. They are often different: someone finds you through organic search, then converts weeks later from a retargeting ad. Store both as separate fields rather than overwriting one with the other.

Can I rely on asking leads how they heard about us?

Self-reported attribution is useful as a second opinion, especially for podcasts, word of mouth and communities that leave no click trail. It is not reliable on its own, because people misremember and pick the first plausible option. Use it alongside tracked source data, not instead of it.

Why do so many of my leads show as direct?

Direct usually means the tracking saw no referrer and no campaign parameters on the visit that converted. Common causes are redirects that drop UTMs, links opened from apps that strip the referrer, and returning visitors whose earlier campaign data was never stored. Capturing source data on the first visit and keeping it until conversion fixes most of it.

Try EndFrame

Add a server-side path for your conversions.

EndFrame collects events first-party and forwards conversions server-side to Meta, GA4, TikTok, and webhooks with event-ID deduplication — then credits each conversion to its campaign, with the visit-to-conversion path you can audit.

No credit card required

Keep reading