Source Based Targeting

Source Based Targeting

Tailor your messages based on where visitors are coming from like Google Ads, Google Organic, Facebook, or Direct.

Source Based Targeting is an OptiMonk targeting condition that shows or hides campaigns based on where a visitor came from before arriving on your site — their traffic source. OptiMonk identifies four major source categories out of the box: Direct (visitors who typed your URL directly or arrived without a referrer), Google Organic (visitors arriving from unpaid search results), Google Ads (visitors arriving from paid search campaigns), and Facebook (visitors arriving via Facebook links or ads). In addition to these predefined sources, you can define any custom source by specifying a referrer URL with matching operators — equals, doesn't equal, contains — to target or exclude visitors arriving from any specific domain or campaign source. Source Based Targeting works in both directions: include it to show a campaign exclusively to visitors from a specific source, or exclude it to suppress a campaign for visitors from a particular source. This allows you to tailor the message a visitor sees based on the context they arrived from — a visitor from a Facebook ad campaign may need a different offer than one who found you through organic search, and a direct-traffic returning customer needs a different message than a first-time paid traffic arrival.

Key benefits

  • Match your on-site message to the off-site context the visitor just came from. A visitor who clicked a Google Ad for a specific product is already primed by that ad's promise — showing them a popup that mirrors or extends that promise (rather than a generic sitewide offer) keeps the message consistent and increases the likelihood of conversion. Source Based Targeting lets you align your OptiMonk campaigns with your acquisition channels so that the experience from ad to landing page to popup feels coherent rather than disconnected.
  • Protect certain campaigns from irrelevant traffic sources. Not every campaign is appropriate for every traffic source. A first-order welcome discount campaign targeted at cold social traffic should be suppressed for organic search visitors who have been evaluating your brand across multiple sessions — they are in a different stage of the funnel and may not need the same incentive. Source exclusion rules let you keep campaigns channel-appropriate by filtering out segments where the message adds no value or could even undermine trust.
  • Segment and test performance by traffic source without building separate campaigns. Combined with OptiMonk's Experiences feature, Source Based Targeting lets you show different messages to different traffic sources within a single campaign — a Facebook-specific variant and a Google Ads-specific variant each with their own design and copy, both managed together. Combined with Campaign Analytics, you can evaluate which source generates the highest conversion rate for each campaign and adjust your targeting or messaging accordingly.

How it works

Step 1
Open the campaign's targeting settings and add a Source condition

In your campaign's targeting settings, click "Select who should see the popup," then select "Source" from the condition list. A panel appears with checkboxes for the predefined sources: Direct, Google Organic, Google Ads, and Facebook.

Step 2
Select your source or define a custom one

Check the box next to any predefined source to include visitors from that source in the campaign's audience. For sources not covered by the predefined list — other social platforms, email campaigns, affiliate referrers, or any specific domain — click "+ Add new" under Custom source. In the dropdown, select "equals" to target visitors arriving from that source, or "doesn't equal" to exclude them. Enter the referrer URL or source identifier in the text field.

Step 3
Save and publish — OptiMonk evaluates the visitor's referrer at display time

When a visitor arrives on your site, OptiMonk reads their referrer information and checks it against your source condition at the moment the campaign is about to display. If the visitor's source matches your include rule, the campaign fires; if it matches an exclude rule, the campaign is silently suppressed. Combine with other targeting conditions and triggers as needed before publishing.

Frequently asked questions

What is Source Based Targeting in OptiMonk?+

Source Based Targeting is a targeting condition that shows or hides campaigns based on the traffic source a visitor arrived from. It supports four predefined sources — Direct, Google Organic, Google Ads, and Facebook — plus a Custom source option where you can define any referrer URL using equals, doesn't equal, or contains operators. It can be used to include only visitors from a specific source or to exclude visitors from a particular source, and can be combined with all other OptiMonk targeting conditions.

How does OptiMonk detect where a visitor came from?+

OptiMonk reads the HTTP referrer information that browsers pass when a visitor navigates from one site to another. When a visitor clicks a link on Facebook and arrives on your site, the browser sends the referring URL (facebook.com) to OptiMonk, which uses it to classify the source. Direct traffic is identified by the absence of a referrer — either the visitor typed the URL directly, used a bookmark, or arrived through a channel that strips referrer data. For paid Google Ads traffic, OptiMonk detects the google.com referrer in combination with paid search signals.

Can I target visitors from a source that is not in the predefined list?+

Yes. The Custom source option under the Source condition lets you define any traffic source by its referrer URL. Click "+ Add new," select the matching operator (equals for exact match, doesn't equal to exclude, or contains to match partial URLs), and enter the relevant URL or domain — for example, instagram.com, email.yourdomain.com, or a specific affiliate referrer. Multiple custom source rules can be added within the same condition.

Can I show different campaigns to visitors from different sources?+

Yes, using two approaches. First, you can create separate campaigns each with its own source condition — one campaign targeting only Google Ads visitors, another targeting only Facebook visitors. Second, you can use OptiMonk's Experiences feature within a single campaign to create different variants for different source audiences, keeping all the variants managed in one place while delivering distinct messages per source.

Does Source Based Targeting work with UTM parameters?+

Source Based Targeting primarily uses referrer URL data to classify traffic. For campaigns relying on UTM parameters — which are appended to URLs in paid campaigns and do not appear in the referrer — OptiMonk's Custom Variable Targeting is more appropriate. By passing UTM parameter values (utm_source, utm_medium, utm_campaign) to OptiMonk via a JavaScript snippet, you can use those values as targeting conditions, enabling precise campaign-level source targeting that referrer-based detection cannot provide.

Ready to try it?

Try OptiMonk for free

Launch your first campaign, learn what works, then scale what converts.

targeting