/Docs

Traffic Source

Traffic source targeting lets you run an experiment only for visitors who arrived at your site through a specific channel — paid ads, organic search, social media, direct visits, or referrals. Visitors who came from a different source see the control experience and are not enrolled.

Available traffic sources

Organic

Visitors who arrived through an unpaid search engine result page — for example, someone who searched for a term on Google or Bing and clicked through to your site without clicking an ad.

Visitors who arrived through paid advertising. This includes Google Ads, Microsoft Ads, and any traffic carrying UTM parameters that indicate a paid campaign, typically with utm_medium=cpc, utm_medium=ppc, or utm_medium=paid.

Social

Visitors who arrived from a social media platform. This includes traffic referred from domains like facebook.com, twitter.com, instagram.com, linkedin.com, pinterest.com, and similar social networks — or traffic with utm_medium=social.

Direct

Visitors who typed your URL directly into their browser, used a bookmark, or arrived from a source that did not pass a referrer header. Direct traffic has no referrer and no UTM parameters.

Referral

Visitors who arrived by clicking a link on another website that is not a search engine or recognized social network. For example, a visitor who clicked a link to your site from a partner's blog post or a news article would be classified as referral traffic.

How the snippet detects traffic source

The A vs B snippet determines a visitor's traffic source using two signals:

  1. document.referrer — the URL of the page the visitor came from. If the referrer matches a known search engine domain, the visitor is classified as organic. If it matches a known social media domain, they are classified as social. Any other non-empty referrer is classified as referral. An empty referrer indicates direct traffic.
  2. UTM parameters — query string parameters added by marketing tools to track campaign traffic. A vs B reads utm_source, utm_medium, and utm_campaign from the current URL. UTM parameters take precedence over the referrer when both are present.
Source is determined on first page load
The traffic source is determined when the snippet first loads on the visitor's session. If the visitor navigates to other pages within your site, the source value stays the same for the entire session. This means that even if the visitor arrives on your homepage and then navigates to the product page where your experiment runs, their traffic source from when they first arrived is what gets used.

Common use cases

Visitors who arrive from paid ads often have different expectations than organic visitors. They may have clicked on a specific ad with a specific promise. You can create separate experiments for paid and organic traffic to test messaging that is appropriate for each channel.

Landing page optimization by channel

If you have a paid campaign driving traffic to a landing page, run a paid-traffic-only experiment to test headlines and CTAs. Organic visitors who also land on that page will not be affected by the test — they will always see the control until you are confident in your results.

Social campaign experiments

Running a social media campaign? Target social visitors only and test whether a social-proof-heavy hero section converts better than a features-focused one. The audience of social visitors is already primed by the social context they came from.

Tip
Combine traffic source with visitor type for powerful segments. For example, target "new visitors from paid traffic" — people who have never been to your site before and arrived through an ad. This is often the audience most influenced by your top-of-funnel experiment.