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.
Paid
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:
- 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.
- UTM parameters — query string parameters added by marketing tools to track campaign traffic. A vs B reads
utm_source,utm_medium, andutm_campaignfrom the current URL. UTM parameters take precedence over the referrer when both are present.
Common use cases
Different experiences for paid vs organic
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.