Traffic Sources & Attribution

How visitors are credited to the ad, search, or link that brought them β€” and how that credit survives weeks until they buy.

Attribution is the question what brought this customer here? It’s harder than it sounds, because the answer has to survive a visitor leaving, coming back three times, and buying two weeks later. Your storefront records the whole journey.

What gets recorded on arrival

Every visit is examined for:

Advertising click IDs β€” the tracking code an ad platform appends when someone clicks an ad. We capture ten:

Click ID Platform
gclid, gbraid, wbraid Google Ads
fbclid Meta
msclkid Microsoft / Bing
ttclid TikTok
li_fat_id LinkedIn
epik Pinterest
twclid X / Twitter
rdt_cid Reddit

Campaign tags (UTMs) β€” utm_source, utm_medium, utm_campaign, utm_content, utm_term.

Referrer β€” where they came from when there’s no ad or campaign tag.

How the referrer is classified

Category Examples
Search Google, Bing, DuckDuckGo, Yahoo, Ecosia, Brave
AI assistants ChatGPT, Perplexity, Claude, Gemini, Copilot
Social Facebook, Instagram, X, LinkedIn, TikTok, Reddit, Pinterest, YouTube
Referral Everything else, recorded by hostname

πŸ’‘ Tip: AI assistants are broken out as their own channel rather than lumped into generic referrals. As more shopping research starts in an AI chat, this lets you see that traffic as a distinct source instead of it disappearing into a list of hostnames.

The journey, not just the last click

Most setups record only the most recent source. Yours keeps a rolling 90-day journey of up to ten touchpoints, so you can see both:

  • First touch β€” what originally introduced them
  • Last touch β€” what brought them back to buy

That difference matters. A customer might discover you through a Google ad, return via an email, and buy after a direct visit. Last-click gives all the credit to β€œdirect”, which tells you nothing useful about where to spend.

ℹ️ Note: Both first- and last-touch source, medium, and campaign are attached to every event β€” including the purchase β€” so you can segment revenue by either.

Why click IDs are kept

Storing the click ID means a sale weeks later can still be matched back to the exact ad click, even after the visitor has closed the browser and returned several times. For a business where research takes weeks β€” equipment, parts, anything considered β€” this is the difference between an ad looking worthless and looking profitable.

The click ID is also carried into lead submissions, so an offline conversion β€” a quote that closes over the phone a month later β€” can still be credited to the ad that started it.

Tagging your own campaigns

Anywhere you control the link, add UTM parameters and the campaign is attributed precisely.

https://yourstore.com/product-page
  ?utm_source=newsletter
  &utm_medium=email
  &utm_campaign=spring-sale

Print, direct mail, and QR codes. Offline has no referrer, so tag it explicitly. The cleanest approach is a short vanity URL that redirects to a tagged one:

  1. Print something short and memorable β€” yourstore.com/spring
  2. Add a redirect to /?utm_source=postcard&utm_medium=direct_mail&utm_campaign=spring26

Short enough for a postcard, fully attributed on arrival, and you can repoint the campaign later without reprinting.

πŸ’‘ Tip: Use utm_medium=ai for links you place in AI assistants or AI ad platforms, so paid and organic AI traffic group together.

Known limits

  • AI referrals are undercounted. Assistants often strip the referrer, so some of that traffic lands in Direct. Tagged links are exact; organic mentions are a floor, not a true count.
  • Bing Chat can’t be separated from Bing search β€” it reports the same hostname.
  • Consent applies. Under a denied-by-default posture, attribution for non-consenting visitors is modeled rather than measured. See Cookie Consent & Privacy.

Next: Verify Your Tracking Works

← PreviousMeta & Reddit PixelsNext β†’Verify Your Tracking Works