What is first-touch attribution, and how is it different from last-touch?
First-touch attribution gives all the credit for a lead or deal to the first campaign that brought that person to your site. Last-touch attribution gives it to the last one before they converted. Multi-touch attribution splits it across several. Same deal, different winners. To compare them, the lead has to carry both the first and the last source.
- First touch: the campaign on the person's first tracked visit. It answers "what found them?"
- Last touch: the campaign on the visit that ended in the form. It answers "what made them act?"
- Multi-touch: every tracked visit in between gets a share, by a rule (linear, time decay) or by an algorithm.
First tagged visit โ stored once โ later visits โ form submission โ last touch stored โ deal closes โ won value grouped by each.
Which model to trust for which decision is its own question, and first touch vs last touch vs multi-touch attribution answers it. This page is the practical half: what each one records on a real path, where your tools already keep each touch, and how to get both onto the lead.
One deal, scored three ways
Here's a single B2B deal and the four visits before it. It's a made-up example, not Trakt customer data.
| Day | Visit | What the URL or browser carried |
|---|---|---|
| 1 | Clicks a LinkedIn ad | utm_source=linkedin&utm_medium=paid-social&utm_campaign=q4-guide |
| 9 | Searches your brand on Google, clicks the organic result | No UTMs. Google is the referrer |
| 15 | Clicks the newsletter | utm_source=newsletter&utm_medium=email&utm_campaign=nov-issue |
| 22 | Types your URL and books a demo | Nothing. A direct visit |
The demo turns into a $12,000 deal (illustrative). Who gets the $12,000?
| Model | Credit goes to | What it tells you |
|---|---|---|
| First touch | LinkedIn ad, $12,000 | LinkedIn found this buyer |
| Last touch, strictly | Direct, $12,000 | Nothing useful. Someone typed the URL |
| Last non-direct touch | Newsletter, $12,000 | Email brought them back to act |
| Linear | $3,000 to each of the four visits | Everyone helped, equally |
Illustrative numbers only.
Notice the strict last-touch row. Direct "wins" the deal, which is how a lot of CRMs end up with half their pipeline filed under Direct or Website. Why leads show up as Direct in the CRM covers that failure on its own.
What last-touch attribution really means in your tools
"Last touch" comes in two flavours, and the difference decides whether the example above says Direct or Newsletter.
- Strict last touch credits whatever started the converting session, direct visits included.
- Last non-direct touch skips direct visits and credits the last campaign before them.
GA4 uses the second one. Its "Paid and organic last click" model ignores direct traffic and gives 100% of a key event to the last channel the person clicked through, and Google notes that "last non-direct click" is another name for the same model (Analytics Help: Get started with attribution). A form that only reads the page URL at submit time does the first one, which is why it records Direct.
Where GA4 and your CRM already keep first and last touch
You probably have both touches already. They're just not on the same record.
| Tool | First touch lives in | Last touch lives in | The catch |
|---|---|---|---|
| GA4 | First user source / medium (user scope) | Session source / medium, plus key events under the property's attribution model | It's analytics data. None of it is on the lead or the deal |
| HubSpot | Original Traffic Source | Latest Traffic Source | Stores a category and two drill-downs, not every UTM value |
| Your CRM, with plain hidden fields | Nothing | Whatever the form posted at submit | The source from earlier visits is gone |
GA4 also narrowed the models you can pick. First click, linear, time decay and position-based were removed in November 2023. What's left is data-driven, paid and organic last click, and Google paid channels last click (Analytics Help). If you want a first-touch view of revenue, it has to come from your own data.
How to capture first-touch and last-touch UTMs on every lead
The pattern is two cookies and two sets of hidden fields. One cookie is written once and never touched again. The other is overwritten every time a tagged visit arrives.
- Add two sets of hidden fields to every form. For example
ft_source,ft_medium,ft_campaignfor first touch andlt_source,lt_medium,lt_campaignfor last touch. The names are yours to choose. Keep them identical across forms. - On every page, store the UTMs. If the URL carries
utm_source, write the last-touch cookie. If no first-touch cookie exists yet, write that one as well. - On the form page, copy both cookies into the hidden fields just before submit.
- Map each hidden field to a contact field in your CRM, then copy them onto the deal when it's created. The hidden fields guide walks through the mapping.
- Report won deal value twice, grouped by
ft_sourceand bylt_source, side by side.
A minimal version of steps 2 and 3:
// Runs on every page. Illustrative: adapt the field names and lifetime.
const DAYS = 90;
const params = new URLSearchParams(window.location.search);
const keys = ["utm_source", "utm_medium", "utm_campaign"];
function setCookie(name, value) {
const expires = new Date(Date.now() + DAYS * 864e5).toUTCString();
document.cookie = `${name}=${encodeURIComponent(value)}; expires=${expires}; path=/; SameSite=Lax`;
}
function getCookie(name) {
const match = document.cookie.match(new RegExp("(?:^|; )" + name + "=([^;]*)"));
return match ? decodeURIComponent(match[1]) : null;
}
if (params.get("utm_source")) {
const touch = JSON.stringify(Object.fromEntries(keys.map((k) => [k, params.get(k) || ""])));
setCookie("lt_touch", touch); // last touch: overwrite on every tagged visit
if (!getCookie("ft_touch")) setCookie("ft_touch", touch); // first touch: write once
}
// On the form page: fill the hidden fields from both cookies.
for (const [prefix, cookie] of [["ft", "ft_touch"], ["lt", "lt_touch"]]) {
const touch = JSON.parse(getCookie(cookie) || "{}");
for (const k of keys) {
const field = document.querySelector(`input[name="${prefix}_${k.replace("utm_", "")}"]`);
if (field && touch[k]) field.value = touch[k];
}
}
Three limits to know before you trust the numbers:
- One browser only. Cookies belong to a browser. The LinkedIn click on a work laptop and the demo booked on a phone look like two people.
- Consent comes first. If your site needs consent for marketing cookies, the script has to wait for it.
- Lifetimes vary. Safari caps cookies written by JavaScript, so a long first-touch window can be shorter than you set (WebKit: Intelligent Tracking Prevention 2.1).
The organic Google visit in the example has no UTMs, so this script ignores it. That's usually what you want, since a referrer-based touch is harder to name consistently. If you do want it, read document.referrer on untagged visits. Persisting UTM parameters across pages has the longer version of this pattern.
Last touch vs multi-touch attribution: what multi-touch needs
First and last touch are two snapshots. Multi-touch needs the whole film: every visit, with a timestamp, tied to one person, kept until the deal closes. Two cookies can't hold that.
In practice that means event-level data in an analytics tool or a warehouse, joined to deals. GA4's data-driven model does assign fractional credit, but to key events inside GA4, not to revenue in your CRM.
For most small B2B teams, first touch plus last non-direct touch on the lead answers the two questions budgets actually hinge on: what finds buyers, and what brings them back to act. Start there. Add multi-touch when you have the volume and the plumbing.
Why the two-cookie setup breaks in practice (and how Trakt helps)
The script above works on day one. It tends to break quietly later:
- A new form goes live without the six hidden fields.
- A redesign drops the script from one template.
- A repeat submission overwrites the deal's fields with Direct.
- Nobody notices until the quarterly report looks wrong.
How Trakt closes the gap
Trakt handles the last-touch half. It remembers UTMs in a first-party cookie for 90 days, so a form submitted days later in the same browser still carries them, and it records each submission with its source attached, even when the form has no hidden fields. A tagged visit with a different utm_source replaces the stored source, and an untagged visit keeps it, so the source on a Trakt lead is the latest tagged touch. Won deal value is credited to that source in Trakt's leads pipeline.
Be clear about what it doesn't do. Trakt keeps one source per lead. It doesn't store a separate first touch, and it has no multi-touch models. If you need a first-touch report, keep the first-touch cookie and fields from the steps above alongside it. Native CRM sync is on the roadmap.
Two-cookie setup vs. Trakt, by requirement
| Requirement | Two-cookie setup | Trakt today |
|---|---|---|
| Last tagged touch on the lead | Script plus hidden fields on every form | Recorded with each submission, no hidden fields needed |
| First touch on the lead | A cookie written once, plus its own fields | Not stored separately. One source per lead |
| Multi-touch models | Needs event-level data | Not available |
| Revenue by source | A CRM report on won deals | Won value credited to the source in Trakt's pipeline |
| Source in your CRM | Field mapping in each form tool | Kept in Trakt (CRM sync planned) |
| A buyer who switches devices | Looks like two people | Same either way |
Trakt in action ยท Revenue by channel
See which channel closed the deal
When a deal closes, its revenue lands on the channel the lead came from, so the report shows revenue and return for each source.
What to do this week
Open your last ten closed-won deals and write down the source field on each. If more than a couple say Direct or Website, you don't have an attribution-model problem yet. You have a capture problem. Fix capture first: tag every link with the UTM builder, add the first-touch and last-touch fields, and wait one sales cycle. Then put the two revenue columns side by side. Where they disagree is where the budget conversation gets interesting.
Start free with Trakt if you want the last-touch source recorded on every lead without maintaining the script.
FAQ
What is first touch attribution?
First touch attribution gives 100% of the credit for a lead or deal to the first campaign that brought the person to your site. It's good for judging which channels find new buyers. It ignores everything that happened afterwards, so nurture emails, retargeting and sales follow-up get no credit at all.
What is last touch attribution?
Last touch attribution gives all the credit to the last touchpoint before the conversion. A strict version counts direct visits, so a buyer who types your URL is credited to Direct. Last non-direct touch skips those and credits the last campaign instead, which is what GA4's paid and organic last click model does.
What is the difference between last-touch and multi-touch attribution for B2B?
Last touch credits one touchpoint, the one right before the form. Multi-touch spreads credit across every tracked visit, by a rule such as linear or time decay, or by an algorithm. B2B deals usually involve several visits over weeks, so multi-touch is more complete, but it needs every visit stored per person and joined to the deal.
Is first click attribution the same as first touch attribution?
Mostly, yes. Both credit the first interaction. "First click" is the term ad and analytics platforms used, because they count ad clicks. "First touch" is broader and can include an untagged visit or an email open. On a lead record built from UTMs, the two usually mean the same thing: the first tagged visit.
Does GA4 still have first click attribution?
No. GA4 removed the first click, linear, time decay and position-based models in November 2023. The models left for key events are data-driven, paid and organic last click, and Google paid channels last click. You can still see a user's first acquisition source in the First user source / medium dimensions.
Can I track first touch and last touch in my CRM?
Yes, if your forms send both. Store the first tagged visit in a cookie that is never overwritten, store the latest tagged visit in a second cookie, and copy both into two sets of hidden fields at submit. Map those fields to contact properties and copy them onto the deal, then report won value by each.


