Channel Attribution
import { Aside } from ‘@astrojs/starlight/components’;
analyze.swiss automatically classifies traffic into marketing channels, helping you understand where your visitors come from and which channels drive the most value.
Default Channel Classification
Section titled “Default Channel Classification”Every visitor is automatically classified into one of these channels:
| Channel | Description | Example Sources |
|---|---|---|
| Direct | No referrer or direct URL entry | Bookmarks, typed URLs |
| Organic Search | Search engines (non-paid) | Google, Bing, DuckDuckGo |
| Paid Search | Paid search ads | Google Ads, Bing Ads |
| Social | Social media (organic) | Twitter, LinkedIn, Facebook |
| Paid Social | Social media (paid) | Facebook Ads, LinkedIn Ads |
| Email campaigns | Newsletters, transactional | |
| Referral | Other websites | Partner links, blogs |
| Display | Display advertising | Banner ads, remarketing |
| Affiliate | Affiliate programs | Partner referrals |
| Other | Unclassified traffic | Unknown sources |
How Classification Works
Section titled “How Classification Works”analyze.swiss uses multiple signals to classify traffic:
1. UTM Parameters (Highest Priority)
Section titled “1. UTM Parameters (Highest Priority)”https://yoursite.com?utm_source=google&utm_medium=cpc&utm_campaign=spring| Parameter | Used For |
|---|---|
utm_source | Traffic source (google, facebook, newsletter) |
utm_medium | Marketing medium (cpc, email, social, banner) |
utm_campaign | Campaign name |
utm_content | Ad variation |
utm_term | Paid search keyword |
2. Referrer Analysis
Section titled “2. Referrer Analysis”If no UTM parameters are present, we analyze the referring URL:
Referrer: https://www.google.com/search?q=analytics→ Channel: Organic Search→ Source: Google3. Click IDs
Section titled “3. Click IDs”We detect ad platform click IDs:
| Click ID | Platform |
|---|---|
gclid | Google Ads |
fbclid | Facebook/Meta |
msclkid | Microsoft Ads |
li_fat_id | LinkedIn Ads |
ttclid | TikTok Ads |
Channel Definitions
Section titled “Channel Definitions”Organic Search
Section titled “Organic Search”Detected when:
- Referrer contains known search engines
- No paid indicators (gclid, etc.)
Search engines detected:
- Google, Bing, Yahoo, DuckDuckGo
- Baidu, Yandex, Ecosia
- And 50+ more
Paid Search
Section titled “Paid Search”Detected when:
utm_medium=cpc,ppc,paid-search,paidsearch- Or
gclid,msclkidpresent - Or referrer is Google/Bing with ad indicators
Social (Organic)
Section titled “Social (Organic)”Detected when:
- Referrer from social networks
utm_medium=social,organic-social
Networks detected:
- Facebook, Twitter/X, LinkedIn
- Instagram, TikTok, Pinterest
- Reddit, YouTube, and more
Paid Social
Section titled “Paid Social”Detected when:
utm_medium=paid-social,paidsocial,social-paid- Or
fbclid,li_fat_idwith ad indicators - Or
utm_source=facebook,instagramwithutm_medium=cpc
Detected when:
utm_medium=email,e-mail,newsletter- Or
utm_source=mailchimp,hubspot,sendgrid, etc.
Referral
Section titled “Referral”Detected when:
- Has referrer from external domain
- Not classified as search or social
Direct
Section titled “Direct”Detected when:
- No referrer present
- No UTM parameters
- Or referrer is the same domain (internal)
Attribution Models
Section titled “Attribution Models”analyze.swiss supports multiple attribution models:
First Touch
Section titled “First Touch”100% credit to the first touchpoint that brought the user.
Visit 1: Google Ads → BrowseVisit 2: Email → BrowseVisit 3: Direct → Convert
Credit: Google Ads = 100%Last Touch
Section titled “Last Touch”100% credit to the last touchpoint before conversion.
Visit 1: Google Ads → BrowseVisit 2: Email → BrowseVisit 3: Direct → Convert
Credit: Direct = 100%Linear
Section titled “Linear”Equal credit across all touchpoints.
Visit 1: Google Ads → BrowseVisit 2: Email → BrowseVisit 3: Direct → Convert
Credit: Google Ads = 33%, Email = 33%, Direct = 33%Time Decay
Section titled “Time Decay”More credit to touchpoints closer to conversion.
Visit 1: Google Ads → Browse (7 days ago)Visit 2: Email → Browse (2 days ago)Visit 3: Direct → Convert (today)
Credit: Google Ads = 15%, Email = 30%, Direct = 55%Position Based (U-Shaped)
Section titled “Position Based (U-Shaped)”40% to first, 40% to last, 20% distributed to middle.
Visit 1: Google Ads → BrowseVisit 2: Email → BrowseVisit 3: Organic → BrowseVisit 4: Direct → Convert
Credit: Google Ads = 40%, Email = 10%, Organic = 10%, Direct = 40%Setting Attribution Window
Section titled “Setting Attribution Window”The attribution window defines how far back to look for touchpoints:
// Via SDKanalyze.track('$conversion', { attribution_window_days: 30});Or set workspace-wide in Settings → Attribution.
| Window | Best For |
|---|---|
| 7 days | Impulse purchases, short sales cycles |
| 30 days | SaaS, B2C products |
| 90 days | B2B, enterprise sales |
Viewing Attribution Reports
Section titled “Viewing Attribution Reports”- Go to Attribution in the dashboard
- Select your conversion event (e.g.,
$signup,$purchase) - Choose attribution model
- Analyze channel contribution
Custom Channel Mapping
Section titled “Custom Channel Mapping”Override default classification for specific sources:
// Mark specific referrer as Partneranalyze.set({ channel_override: 'Partner'});Or configure in Settings → Channels.
Next Steps
Section titled “Next Steps”- Paid Ads Attribution – Connect ad platforms
- Content Attribution – Track content performance
- UTM Parameters – Best practices