Skip to content
Skip to main content
← Back to Documentation

Attribution Mechanics

How a pageview resolves to a campaign, how long that campaign sticks, and which model a report reads it under. See Attribution for the product overview.


Source resolution order

We read a campaign source from the first of four query parameters that is present, checked in this order:

  1. utm_source, the standard tag.
  2. source, read when utm_source is absent.
  3. ref, read when neither of the above is present.
  4. src, read only when none of the first three are present.

A link carrying more than one of these is resolved by that order, not by which parameter comes first in the URL. utm_medium, utm_campaign, utm_term and utm_content have no aliases: each is read from its own named parameter only.

Click ids

An ad platform's own click id names the source even when a link carries no UTM tag at all. We recognise eight. The medium is only written as the paid value below when the visit's referrer corroborates the network the click id names; otherwise the medium records the parameter itself, so an ad-platform click id surviving in a pasted link, an email or a bookmark is never counted as a fresh paid click.

Click id Network Medium, corroborated Medium, uncorroborated
gclid Google Ads cpc (gclid)
gbraid Google Ads (iOS, App Tracking Transparency) cpc (gbraid)
wbraid Google Ads (iOS, App Tracking Transparency) cpc (wbraid)
msclkid Microsoft Advertising cpc (msclkid)
twclid X Ads cpc (twclid)
yclid Yandex Direct cpc (yclid)
li_fat_id LinkedIn Ads cpc (li_fat_id)
fbclid Meta (Facebook and Instagram) social (fbclid)

fbclid is the one exception: Meta appends it to organic posts and profile links as well as ads, so even a corroborated fbclid records medium social, never a paid value.

What first-touch means precisely

A visit is a run of pageviews from the same visitor with no gap longer than 30 minutes. The first pageview of a visit writes its source, medium, campaign, term and content into both the current columns and a second, first-touch set: firstTouchUtmSource, firstTouchUtmMedium, firstTouchUtmCampaign, firstTouchUtmTerm and firstTouchUtmContent, alongside entryUrl, the page the visit began on.

Every later pageview in the same visit inherits that first-touch set unchanged. Its current columns inherit the same values too, unless the later pageview carries its own campaign parameters, in which case the current columns record that page's own tag and the first-touch set still holds the visit's original. This is why first-touch and last-touch usually agree inside one visit: the current columns only diverge from first-touch when a visitor clicks a second tagged link partway through the same visit.

The conversion window

There is no multi-day conversion window, and this is not a capability we have not built yet. A visit id is derived from the visitor's IP address, user agent and a salt that rotates daily and is deleted after 48 hours. Two visits on different days therefore cannot be linked back to the same person, by us or anyone else, so attribution and the goal-completion join are both scoped to the single visit the campaign touch happened in. A campaign's conversions are the goals completed inside the visits it attributed, not the goals completed within some number of days of the click.

The attribution model setting

The Attribution Model selector on the Campaign Performance widget chooses which touch inside a visit gets the credit. All three read the same stored columns and the same visit boundary above; none of them look outside the visit.

Model Credits
First Touch (default) The campaign the visit began on.
Last Touch The most recent tagged campaign in the visit, direct touches included.
Last Non-Direct Click The most recent tagged campaign that did not arrive direct, so a visit that clicked an ad, left, and came straight back later still credits the ad.

First Touch and Last Touch read the same window over the whole visit and usually agree, for the reason above: a visit's current columns rarely change mid-visit. Last Non-Direct Click is the one that moves, because it is the only model that drops touches with no referrer.

Explore the documentation

Jump to another guide.