Skip to content
LATYNEX
Insights & Guides

How to track lead source from your website to your CRM

LATYNEX Digital · Published 25 Sept 2026

Record the source when the lead arrives. If you wait until later, you usually cannot recover it.

Direct answer

To track lead source, capture the source information in the visitor's session, store it, submit it with the enquiry form as hidden fields, and write it to dedicated source fields on the CRM record, using a fixed naming scheme so reports can group leads consistently. The key timing point is that the information exists in the browser when the visitor arrives and is gone soon after: a lead that reaches your CRM without its source rarely gets it back. The result is useful for comparing where enquiries come from, not a perfect account of what caused a sale.

This page covers the tracking design. The handling of the submission itself is in what happens after a website form submission, and the wider connection between site and CRM is described on website to CRM integration.

What to capture

Capture a small set of values that answer the question 'how did this person find us', and resist the urge to store everything. More fields means more to maintain and more to explain.

  • The channel or medium, for example search, paid, email, social, referral, direct.
  • The specific source, such as the site, platform or newsletter.
  • The campaign or link label you set on links you control.
  • The first page the visitor landed on, and the page they submitted from.
  • The referring address, where the browser provides it.
  • The date and time of first visit and of submission, since the gap tells you something.

Consent-aware capture

Storing information about a visitor's session can be subject to privacy and consent rules that differ by location. We do not give legal advice: confirm with a privacy adviser what you may capture, when, and what you must tell visitors and record. As a design principle, build capture so that it respects whatever you decide, for instance by only storing session details once the visitor's choices allow it, and by keeping a clear place to change that rule without rebuilding the form.

It also helps to design for the case where no source is available. Some visitors will decline tracking or arrive without a referrer. The form and the CRM should accept that and record 'unknown' honestly rather than guessing.

Hidden form fields

The common pattern is that a small script reads the source values from the address and referrer on arrival, keeps them for the visit, and fills hidden fields on your enquiry form. When the visitor submits, those values travel with the message. Set this up on every form that can create a lead, not only the main contact form, including quote requests, booking forms and chat handoffs.

Test with real journeys. Open the site from a labelled link, browse two or three pages, submit, and check what arrived. Then test the awkward cases: arriving on one page and submitting from another, returning later, and opening a link in a new tab. A tracking setup that works only when the visitor submits from the landing page will misreport the rest.

CRM source fields

Give the CRM dedicated fields for the values you captured, separate from the free-text notes. Structured fields are what make reporting possible. Decide which are pick lists with a controlled set of values, such as channel, and which are free text, such as campaign label. Separate the first-touch values, which should be written once and not overwritten, from the most recent ones if you want both.

Decide what happens when the same person submits a second time, since a naive setup overwrites the original source. Where a CRM already has a lead-source field, check what it holds and whether it mixes methods, such as 'referral' meaning a person in one record and a website link in another. Cleaning up such a field before adding new tracking avoids building on an unreliable base. If duplicates are part of the problem, see preventing duplicate leads in a CRM.

Naming rules

Most broken source reports come from inconsistent labels, not from missing data. 'LinkedIn', 'linkedin' and 'li' become three rows. Write a short naming rule and keep it where the people who create links can see it.

  • Use lowercase and one separator, and never spaces.
  • Keep a list of allowed channel and source values, and add to it deliberately.
  • Label only links you control; do not try to label organic search.
  • Name campaigns in a consistent order, such as month, offer, audience.
  • Give one person the job of approving new labels.

Reporting by source

Once the fields exist, report by source at the stage that matters to the business: not only how many enquiries came from each source, but how many were qualified, how many became opportunities and how many closed. A source that produces many enquiries and few qualified ones is telling you something different from one that produces few and good ones. If your pipeline stages are inconsistent, the report will be too; the CRM has to reflect the real process first.

Give the report a named owner and a rhythm, and keep the question narrow: which sources should we spend more time or money on, and which should we stop.

Limits of attribution

Be honest about what this can and cannot tell you. It records how a visitor arrived, usually at first visit or at the visit when they submitted. It does not show the conversation that happened in a message, a recommendation from a colleague, or the earlier visit on another device. Some sources arrive without labels and show as direct. Some visitors will not be tracked at all. Treat the result as a useful comparison, not as proof of cause, and add a simple question on the form or in the first call, such as 'how did you hear about us', which often catches what the technical capture missed.

We do not claim full-funnel accuracy, and we do not replace an analytics specialist if you need advanced multi-channel modelling. The setup described here is the practical foundation most service businesses need.

How LATYNEX approaches this

We can implement source capture on your forms and the matching CRM fields as part of a website-to-CRM workflow, scoped like any other integration: one workflow across up to three systems fits the fixed-scope Automation Sprint (€1,690), and larger tracking needs are custom scope. If your CRM is HubSpot, see connecting your website to HubSpot. The Automation Opportunity Finder can help you judge whether this is your first priority. The parent service is website to CRM integration.

Questions

Why capture the source at submission rather than working it out later?+

The information about how the visitor arrived exists in their browser session and disappears soon after. Once the lead is in the CRM without it, you generally cannot reconstruct it reliably. Capturing it at submission is the only dependable moment.

Do we need consent before capturing source data?+

That depends on your location and what exactly you store, and we do not give legal advice. Confirm the rules with a privacy adviser. We design capture so that it can follow whatever rules you decide, and so that missing data is recorded as unknown rather than guessed.

Can this tell us which channel really caused a sale?+

No. It records how the lead arrived, not everything that influenced them. Use it to compare sources, and add a 'how did you hear about us' question to catch what tracking misses.

What if our CRM already has a lead source field?+

Check what it currently holds. If it mixes meanings, clean it up or add new dedicated fields, so new tracking does not sit on an unreliable base. Keep first-touch values from being overwritten on later submissions.

Which forms need the hidden fields?+

Every form that can create a lead: contact, quote, booking, and any chat handoff. Test each with real journeys, including arriving on one page and submitting from another.

Related