Analytics

Referrers

Track traffic sources with referrer information and UTM parameters

Referrer and UTM Parameters

The analytics system captures referrer information through multiple methods to give you comprehensive insights about your traffic sources. This page explains how referrer detection works and how you can use URL parameters for better tracking.

Understanding Referrer Detection

Two complementary methods are used to identify where your visitors come from:

  1. HTTP Referer Header: Automatically sent by browsers when users click links
  2. URL Query Parameters: Manually added to links for improved tracking

This dual approach significantly reduces the number of unknown sources in your analytics.

Note: The HTTP specification contains a historical typo, using "Referer" (with one 'r') instead of the correct spelling "Referrer" (with two 'r's).

Setting Custom Referrers with URL Parameters

To ensure accurate source tracking, especially when the HTTP Referer header might be blocked or unavailable, you can use one of these parameters to identify the referrer:

  • utm_source
  • ref
  • referer
  • referrer
  • source

We recommend using ref for simplicity or utm_source when using other UTM parameters (see below).

Example:

https://yourdomain.com/?ref=Bluesky

Visitors clicking this link will appear under "Bluesky" in your referrer reports, even if their browser doesn't send the HTTP Referer header.

Campaign Tracking with UTM Parameters

UTM (Urchin Tracking Module) parameters provide a standardized way to track marketing campaigns across different channels. All standard UTM parameters are supported.

Primary UTM Parameters

  • utm_source: Identifies the traffic source (e.g., newsletter, search engine, social platform)
  • utm_medium: Specifies the marketing medium (e.g., email, cpc, banner, social)
  • utm_campaign: Names your specific campaign (e.g., spring_sale, product_launch)

Secondary UTM Parameters

  • utm_content: Distinguishes between similar content or links within the same ad (useful for A/B testing)
  • utm_term: Identifies search terms for paid search campaigns

Example:

https://yourdomain.com/?utm_source=Newsletter&utm_medium=Email&utm_campaign=Weekly_Update

Best Practices

  1. Be consistent with your naming conventions across all campaigns
  2. Use lowercase for all parameter values to avoid duplicate entries (e.g., "twitter" vs "Twitter")
  3. Replace spaces with underscores or plus signs (e.g., spring_sale or spring+sale)
  4. Keep tracking codes short but descriptive
  5. Document your naming strategy to maintain consistency across your team

How Referrers Are Processed

When a visitor arrives at your site, the referrer source is determined in this order:

  1. Check for URL parameters (ref, utm_source, etc.)
  2. If no parameters exist, use the HTTP Referer header
  3. If neither is available, mark as "Direct" or "Unknown"

This hierarchical approach ensures maximum accuracy in your traffic source reporting.

Reducing "Unknown" Referrers

A high percentage of "unknown" referrers is common in web analytics due to:

  • Direct navigation (typing URLs or using bookmarks)
  • Privacy features in browsers blocking referrer information
  • Traffic from apps that don't send referrer information
  • HTTPS to HTTP transitions (browsers strip referrer data)

By consistently using URL parameters in your outbound links, email campaigns, and promotional materials, you can significantly reduce "unknown" traffic sources in your analytics.