Traffic Source Analysis and Optimization

Understanding which traffic sources generate profit (not just visits) is the key to smart marketing. This comprehensive guide shows you how to analyze traffic sources in Alpha Insights, understand how source detection works, and optimize your marketing budget based on profitability.

Prerequisites: Make sure website tracking is enabled. See Understanding Website Analytics to get started.

Traffic Source Categories

Alpha Insights automatically categorizes all traffic into these sources using the WPDAI_Traffic_Type_Detection class:

Organic Search

What it is: Visitors from search engines (Google, Bing, Yahoo) clicking unpaid search results

How it's detected: Referrer domain matches known search engine domains:

Technical note: Detection checks if referrer contains search engine domain AND typically includes a search query parameter (q=, p=, query=, etc.), though the query itself is not stored.

Typical characteristics:

Optimization strategies:

Google Ads (Paid Search)

What it is: Visitors from Google Ads or Bing Ads paid campaigns

How it's detected:

  1. First check: Query parameter gclid (Google Click ID) present in URL
  2. Second check: Query parameter utm_medium=cpc from google.com or bing.com
  3. Priority: Query parameters override referrer-based detection

Example URLs:

https://yourstore.com/products?gclid=abc123xyz
https://yourstore.com?utm_source=google&utm_medium=cpc

Typical characteristics:

Optimization:

Social Media (Organic)

What it is: Visitors from social platforms clicking organic (non-paid) posts

Platforms detected:

How it's detected:

  1. Query parameter check first: fbclid (Facebook Click ID) forces Social classification
  2. Query parameter check: utm_source=fb or utm_source=ig or utm_source=Facebook
  3. Referrer domain match: Checks if referrer contains facebook.com, instagram.com, etc.
  4. Social vs Paid Social: If utm_medium=cpc also present, may be classified differently

Technical note: Facebook and Instagram often strip referrer data for privacy. Using fbclid is automatic, but UTM parameters are more reliable for other platforms.

Typical characteristics:

Optimization strategies:

Paid Social (Facebook Ads, Instagram Ads, TikTok Ads)

What it is: Paid advertising on social platforms

How it's detected:

  1. Facebook/Instagram: fbclid parameter + comes from facebook.com/instagram.com
  2. Manual tagging: utm_medium=cpc or utm_medium=paid_social from social platforms
  3. Campaign tracking: meta_cid={{campaign.id}} for Facebook campaign attribution

Note: Alpha Insights currently classifies Facebook paid traffic as "Social" (not separate "Paid Social"). Use Facebook Ads integration for campaign-level tracking.

Typical characteristics:

Optimization:

Email

What it is: Visitors from email campaigns

How it's detected:

Priority 1 - Query parameters:

Priority 2 - Referrer domain matching:

Technical note: Email providers often use tracking domains (e.g., klclick.com for Klaviyo) which Alpha Insights recognizes automatically.

Typical characteristics:

Best practices:

Direct

What it is: Visitors typing URL directly, using bookmarks, or unknown source

How it's detected:

  1. No referrer URL present (empty or null)
  2. Referrer URL is your own domain (internal navigation)
  3. Referrer cannot be determined
  4. Catches all traffic that doesn't match other categories

Typical characteristics:

What "Direct" actually includes:

Note: High direct traffic often indicates strong brand recognition, but some may be misattributed. Use UTM parameters on all external links to reduce "dark traffic."

Referral

What it is: Visitors clicking links from other websites

How it's detected:

  1. Referrer URL present and not empty
  2. Referrer domain is NOT your own site
  3. Referrer domain is NOT a known search engine, social platform, or email provider
  4. Catches all external links not classified elsewhere

Examples of referral sources:

Typical characteristics:

Optimization:

AI Chat

What it is: Visitors from AI chatbot assistants and search interfaces

How it's detected: Referrer domain matches AI chat platforms:

Why it matters: Growing traffic source as users adopt AI search. Different user behavior and intent than traditional search.

Typical characteristics:

Optimization:

App

What it is: Traffic from mobile apps or app-based browsers

How it's detected: Referrer URL starts with app:// protocol

Use case: If you have a mobile app or app-based shopping, this tracks that traffic separately.

Unknown

What it is: Traffic that couldn't be classified

When it happens:

If you see significant "Unknown" traffic:

Traffic Source Detection Priority

Alpha Insights checks sources in this order (first match wins):

  1. Query Parameters (highest priority):
  2. Referrer Domain Matching:
  3. Referrer Analysis:

Why query parameters take priority: They're explicit and intentional (you added them), so they're more reliable than referrer data which can be stripped or missing.

Viewing Traffic Source Data

Traffic Channels Report

The Traffic Channels report is a pre-built report in Alpha Insights. To learn about creating custom traffic reports, see Creating Custom Reports.

  1. Go to Alpha Insights → Website Traffic → Traffic Channels
  2. See comprehensive breakdown of all traffic sources

Data visualizations:

Key table columns explained:

Column What It Shows How It's Calculated
Source Traffic source category Determined by WPDAI_Traffic_Type_Detection class
Sessions Number of visits Count of unique session_ids
Users Unique visitors Count of unique IP addresses
Transactions Orders from this source Count of transaction events
Total Value Revenue generated Sum of event_value for transactions
Conversion Rate % of sessions that converted (Transactions / Sessions) × 100

Source Performance Over Time

Track trends and seasonality:

  1. View the "Sessions By Acquisition Channel" line chart
  2. Identify which sources are growing or declining
  3. Spot seasonal patterns (e.g., email spikes during holidays)
  4. Adjust date range to analyze different time periods

What to look for:

Analyzing Performance by Source

Revenue Per Session - The Key Metric

Formula: Total Revenue / Total Sessions

Why it's THE most important metric: It tells you the average value of a visitor from each source, accounting for both conversion rate and average order value.

Example analysis:

Source: Organic Search
- Sessions: 5,000
- Revenue: $35,000
- Orders: 225
- Conversion Rate: 4.5%
- Average Order Value: $156
- Revenue per session: $7.00

Source: Facebook Organic
- Sessions: 3,000
- Revenue: $9,000
- Orders: 60
- Conversion Rate: 2.0%
- Average Order Value: $150
- Revenue per session: $3.00

Insight: Organic search visitors generate 2.3x more revenue per session.
Even though AOV is similar, organic has 2.25x better conversion rate.
Recommendation: Invest more in SEO, less in Facebook organic posts.

Profit Per Session - Even Better

In Alpha Insights, you can see profit per session by adding product costs. To add product costs, see Cost of Goods Manager.

Source: Email
- Sessions: 500
- Revenue: $4,500
- Product Costs: $1,800
- Gross Profit: $2,700
- Profit Per Session: $5.40

Source: Social
- Sessions: 3,000
- Revenue: $9,000
- Product Costs: $4,500
- Gross Profit: $4,500
- Profit Per Session: $1.50

Insight: Email generates 3.6x more profit per session.
Even with lower volume, email is far more valuable than social.
Recommendation: Prioritize list growth and email marketing.

Conversion Rate by Source

Shows: Which sources bring higher-quality, ready-to-buy traffic

Example comparison:

Email:           8.2% conversion rate
Organic Search:  4.5%
Google Ads:      6.1%
Social Organic:  1.8%
Direct:          5.5%
Referral:        3.2%

Insights from this data:

Average Order Value by Source

Shows: Which sources bring bigger spenders

Direct:         $95 AOV
Email:          $87 AOV
Organic Search: $78 AOV
Google Ads:     $70 AOV
Paid Social:    $65 AOV
Social Organic: $52 AOV

Why this matters:

Comparing Paid vs Organic Channels

Full Funnel Comparison

Paid Channels (Google Ads, Facebook Ads):

Organic Channels (SEO, Social, Email):

Blended Channel Analysis

Compare total contribution across paid vs organic:

Paid Channels (Google Ads + Facebook Ads):
- Sessions: 4,000
- Revenue: $18,000
- Orders: 180
- Conversion Rate: 4.5%
- Revenue per session: $4.50
- Ad Spend: $6,000
- ROAS: 3.0 ($18,000 / $6,000)
- Net Profit After Ad Spend: $3,000

Organic Channels (Search + Social + Email):
- Sessions: 6,000
- Revenue: $24,000
- Orders: 300
- Conversion Rate: 5.0%
- Revenue per session: $4.00
- Ad Spend: $0
- Net Profit: $10,800 (after COGS)

Insight: Organic channels deliver 3.6x more profit with 50% more sessions.
Paid channels profitable but should not exceed 30% of total traffic.
Recommendation: Maintain paid ads for consistent flow, invest heavily in organic growth.

Source Optimization Strategies

Strategy 1: Double Down on Winners

Identify: Sources with conversion rates and revenue per session above your average

Action plan:

Example: If email has 8% conversion rate and $6.00 revenue per session:

  1. Invest heavily in list growth (popups, lead magnets)
  2. Send more frequent campaigns (test frequency)
  3. Segment list for personalization
  4. Create email-exclusive offers
  5. Build automation flows (abandoned cart, welcome, post-purchase)

Strategy 2: Improve Moderate Performers

Identify: Sources with decent volume but below-average conversion rates or revenue per session

Optimization tactics:

Strategy 3: Fix or Cut Losers

Identify: Sources with very low conversion rates or minimal revenue contribution

Decision framework:

  1. If paid channel with ROAS < 1.5:
  2. If organic channel with < 1% conversion:
  3. If referral site sending low-quality traffic:

Warning: Don't cut channels too quickly. Some channels have long conversion windows or assist conversions. Analyze at least 30-90 days of data before deciding.

Device-Based Source Analysis

Combine traffic source with device data for deeper insights:

Facebook + Mobile = 1.5% conversion rate
Facebook + Desktop = 3.2% conversion rate

Insight: Facebook mobile traffic significantly underperforms.
Possible causes:
- Mobile site speed issues
- Mobile UX problems
- Mobile checkout friction
- Audience targeting (mobile users less serious buyers)

Actions:
- Optimize mobile site speed (test with PageSpeed Insights)
- Improve mobile checkout flow
- Add mobile-specific CTAs
- Consider mobile-only landing pages
- Test different ad formats for mobile

Understanding Multi-Touch Customer Journey

Most customers don't buy on first visit. For detailed information on how sessions and attribution work, see the Session Management guide.

They might:

  1. First visit: Click Facebook Ad (awareness) → Browse, don't buy
  2. Second visit: Organic Google search (consideration) → Read reviews, compare
  3. Third visit: Direct visit to complete purchase (decision) → Ready to buy

How Alpha Insights handles this:

What this means:

To understand full journey:

Seasonal Source Patterns

Identifying Seasonality

Different sources perform differently by season:

Q4 (Holiday Season - Oct-Dec):
- Direct traffic surges (brand searches, gift shopping)
- Email performs exceptionally (holiday promotions)
- Social organic increases (holiday content sharing)
- Paid ads most expensive but highest volume

Q1 (January-March):
- Organic search increases (New Year resolutions, research)
- Direct traffic drops (post-holiday)
- Email engagement lower (email fatigue)
- Paid ads cheaper (less competition)

Q2 (April-June):
- Social organic peaks (summer content, events)
- Referral traffic increases (spring press coverage)
- Email engagement improves
- Steady growth period

Q3 (July-September):
- Back-to-school drives specific categories
- Traffic generally stable
- Good time for testing and optimization
- Prepare for Q4 campaigns

Use these insights to:

Advanced Analysis: Source × Product Category

Different sources may prefer different products:

Organic Search → Best for:
- Educational products (books, courses)
- Problem-solving products (tools, software)
- High-consideration purchases

Social Media → Best for:
- Visual products (fashion, home decor)
- Impulse buys (under $50)
- Trending items

Email → Best for:
- Repeat purchase products
- New arrivals
- Sale items and promotions

Direct → Best for:
- Replenishment products
- Favorite products
- Subscription items

Action: Analyze traffic source by product category in Report Builder to identify which sources drive sales for which product types. Promote appropriate products to each channel.

Creating Source-Optimized Marketing Plans

You can export traffic data to CSV or Excel for deeper analysis. See Export Features to learn how.

90-Day Marketing Optimization Plan:

  1. Week 1-2: Audit
  2. Week 3-4: Optimize Winners
  3. Week 5-8: Improve Moderates
  4. Week 9-12: Review and Scale

Best Practices Summary

Technical Reference: Source Detection Logic

PHP Class: WPDAI_Traffic_Type_Detection

Detection method: determine_traffic_source($referral_url, $query_parameters)

Process flow:

  1. check_query_parameters() - Checks UTM and tracking parameters first
  2. is_traffic_organic() - Matches against $organic_sources array
  3. is_traffic_paid_google() - Currently returns false, relies on gclid parameter
  4. is_traffic_mail() - Matches against $referral_url_email_sources array
  5. is_traffic_ai_chat() - Matches against $referral_url_ai_chat_sources array
  6. is_traffic_social() - Matches against $social_sources array
  7. is_traffic_direct() - Returns true if referrer is empty or null
  8. Final checks: Own domain → Direct, app:// → App, otherwise → Referral

Available traffic types function: WPDAI_Traffic_Type_Detection::available_traffic_types()

Returns array:

[
    'organic'    => 'Organic',
    'google_ads' => 'Google Ads',
    'email'      => 'Email',
    'social'     => 'Social',
    'direct'     => 'Direct',
    'app'        => 'App',
    'referral'   => 'Referral',
    'ai_chat'    => 'AI Chat',
    'unknown'    => 'Unknown'
]

Next Steps