Traffic source tracking
How each event is attributed to its channel — detection, session first-touch, and counting.
The Events by traffic source section on each monitored domain breaks your tracked events down by where the visitor came from. Where GA4 shows traffic source for sessions (and makes you build a custom explore to see it per conversion), TC Pro attributes every tracked event to a source and charts it over time — so you can answer "which channels actually drive my form submits / purchases / calls?" directly.
How a source is detected
At capture time TrackingCoder resolves a single short source label in strict priority order — highest-signal first. It never stores a raw URL.
1. Ad-platform click IDs (paid clicks)
A click ID in the landing URL is added by the ad platform itself, so its presence is proof the visitor arrived from that platform's paid click — the most reliable signal there is:
gclid/gbraid/wbraid→google_adsfbclid→metamsclkid→microsoft_adsli_fat_id→linkedinttclid→tiktoktwclid→xdclid→display_video_360epik→pinterest·rdt_cid→reddit
2. UTM tag
If there's no click ID, an explicit utm_source on the landing URL is used verbatim — so your own campaign tagging always wins over a guessed referrer.
3. Referrer, normalised to a label
With no click ID or UTM, the referring site's hostname is mapped to a small, groupable label so the value space stays clean in GA4 and the dashboard — e.g. google_organic, bing_organic, duckduckgo, meta_organic, x_organic, linkedin_organic, reddit_organic, youtube, tiktok_organic, pinterest_organic, and the AI assistants chatgpt, perplexity, claude. An unrecognised referrer is kept as its bare hostname.
4. Direct
No click ID, no UTM, no usable referrer → direct.
Session first-touch — why a deep-page conversion still credits the real channel
The signals above are read once, on the first pageview of each browser session, and reused for every event in that session. We snapshot the entry URL + referrer into sessionStorage on landing (from both the generated tracking code and the always-on install-check tag), then resolve the source from that snapshot at event time.
This matters because referrers are same-origin once a visitor starts clicking around your site. Without first-touch, someone who lands from a Google Ad, browses to /pricing, then converts there would be recorded as direct (the referrer to /pricing is your own site). First-touch locks in the original google_ads the moment they arrived — so the conversion is credited correctly no matter how many pages later it happens.
How events are counted
- Per event. Every tracked fire carries its session source. The count for a source is simply the number of fires that carried it over the selected range.
- The chart plots events per source over time — one line per source, bucketed by hour (Today/24h) or day, on the same timezone-aware axis as the main activity chart.
- Top sources get their own line; the rest fold into
Otherso the chart stays readable. - The breakdown bars below the chart rank sources by total fires, each with its share (% of fires that carried a source).
- "X of Y fires carried a source" — fires captured before parameter capture was enabled (older Monitor containers) have no source and are excluded from the breakdown, but shown as context so the numbers stay honest.
- Range + retention. Use the range selector (Today → 90d). Raw per-event data is retained ~90 days, so history goes back that far.
Accuracy & limits (read this)
- Session-scoped. First-touch is per browser session — it resets on a new session, and isn't stitched across devices or sessions. It answers "what brought this visit in", not lifetime multi-touch attribution.
- Referrer stripping. Some browsers / strict referrer-policies /
https→httphops drop the referrer; with no UTM or click ID that visit reads asdirect. UTM-tag your campaigns for airtight attribution. - Needs current tracking code. Session first-touch + capture ship in the current codegen and Monitor tag — existing sites get it after you regenerate or re-import the Monitor container. Older snippets keep last-touch behaviour until then.
Privacy
Only the short source label is stored. URL query strings (which can carry campaign secrets or PII) are stripped server-side at ingest; the raw referrer URL is never persisted. Your GA4 / Meta / Ads destinations still receive every parameter unchanged — this only governs what TrackingCoder keeps for the monitoring view.
💡 vs GA4