{"id":112479,"date":"2023-07-10T11:41:24","date_gmt":"2023-07-10T15:41:24","guid":{"rendered":"https:\/\/optinmonster.com\/?post_type=optinmonster_docs&#038;p=88373"},"modified":"2025-08-08T14:46:10","modified_gmt":"2025-08-08T18:46:10","slug":"how-to-use-optinmonsters-referral-detection-for-advanced-lead-targeting","status":"publish","type":"optinmonster_docs","link":"https:\/\/optinmonster.com\/docs\/how-to-use-optinmonsters-referral-detection-for-advanced-lead-targeting\/","title":{"rendered":"How to Use OptinMonster&#8217;s Referral Detection for Advanced Lead Targeting"},"content":{"rendered":"\n<p>OptinMonster makes it easy to show campaigns to visitors who have been referred to your site from another specific website.<\/p>\n\n\n\n<p>In this article, you&#8217;ll learn how to use OptinMonster&#8217;s Referral Detection rule.<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column alert alert-info is-layout-flow wp-block-column-is-layout-flow\">\n<p><strong><em>Before you start<\/em><\/strong>, this feature is available with a <a href=\"https:\/\/optinmonster.com\/pricing\" target=\"_blank\" rel=\"noopener\" title=\"Pro and higher subscription\">Pro and higher subscription<\/a>.<\/p>\n<\/div>\n<\/div>\n\n\n\n<p>Some situations you might find the Referral Detection rule especially useful include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>If you&#8217;re running a promotion with another website and want to show a targeted message only to visitors who reach your site through that promotion.<\/li>\n\n\n\n<li>To show a specific message only to visitors who reach your site through social media, e.g. through Facebook, Twitter, Instagram, etc.<\/li>\n\n\n\n<li>To hide campaigns from traffic who reach your site through another specific website.<\/li>\n<\/ul>\n\n\n\n<p><iframe title=\"YouTube video player\" src=\"https:\/\/www.youtube.com\/embed\/EtHIgfFDDhs?rel=0\" width=\"800\" height=\"450\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Referral Detection Targeting<\/h2>\n\n\n\n<p>To target your campaign to visitors who have reached your site by clicking on a link from another specific website, follow these steps:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Navigate to the <strong>Display Rules<\/strong> view in the campaign builder.<br><img decoding=\"async\" width=\"800\" height=\"560\" class=\"alignnone size-full wp-image-180093\" src=\"https:\/\/optinmonster.com\/wp-content\/uploads\/2023\/06\/display-rules-view.jpg\" alt=\"Navigate to the Display Rules in the OptinMonster campaign builder.\" srcset=\"https:\/\/optinmonster.com\/wp-content\/uploads\/2023\/06\/display-rules-view.jpg 800w, https:\/\/optinmonster.com\/wp-content\/uploads\/2023\/06\/display-rules-view-300x210.jpg 300w, https:\/\/optinmonster.com\/wp-content\/uploads\/2023\/06\/display-rules-view-768x538.jpg 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/li>\n\n\n\n<li>Next, when adding or editing a rule select <strong>Who (Personalization)<\/strong> from the left-hand list and select the <strong>Referral Targeting<\/strong> option.<br><img decoding=\"async\" width=\"800\" height=\"565\" class=\"alignnone size-full wp-image-180400\" src=\"https:\/\/optinmonster.com\/wp-content\/uploads\/2023\/04\/referrer-rule.jpg\" alt=\"Referral Detection targeting in OptinMonster.\" srcset=\"https:\/\/optinmonster.com\/wp-content\/uploads\/2023\/04\/referrer-rule.jpg 800w, https:\/\/optinmonster.com\/wp-content\/uploads\/2023\/04\/referrer-rule-300x212.jpg 300w, https:\/\/optinmonster.com\/wp-content\/uploads\/2023\/04\/referrer-rule-768x542.jpg 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/li>\n\n\n\n<li>Configure the rule as desired using the operator dropdown and text field.<br><img decoding=\"async\" width=\"748\" height=\"118\" class=\"alignnone size-full wp-image-180401\" src=\"https:\/\/optinmonster.com\/wp-content\/uploads\/2023\/04\/referrer-rule-options.jpg\" alt=\"Referral targeting options.\" srcset=\"https:\/\/optinmonster.com\/wp-content\/uploads\/2023\/04\/referrer-rule-options.jpg 748w, https:\/\/optinmonster.com\/wp-content\/uploads\/2023\/04\/referrer-rule-options-300x47.jpg 300w\" sizes=\"(max-width: 748px) 100vw, 748px\" \/><br>The following options are available for ReferralTargeting:\n<ul class=\"wp-block-list\">\n<li>exactly matches<\/li>\n\n\n\n<li>does not exactly match<\/li>\n\n\n\n<li>contains<\/li>\n\n\n\n<li>does not contain<\/li>\n\n\n\n<li>is empty<\/li>\n\n\n\n<li><a href=\"https:\/\/optinmonster.com\/docs\/how-to-use-optinmonsters-matching-the-pattern-regex-rules\/\" target=\"_blank\" rel=\"noopener\" title=\"\">matches the pattern<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/optinmonster.com\/docs\/how-to-use-optinmonsters-matching-the-pattern-regex-rules\/\" target=\"_blank\" rel=\"noopener\" title=\"\">does not match the pattern<\/a><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>When you&#8217;re finished, <strong>Save <\/strong>the campaign.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"faq\">FAQs<\/h2>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"email\">Can I use Referral Detection to hide\/show campaigns to visitors arriving from my email newsletter?<\/h5>\n\n\n\n<p>No, however, you can follow our guide on <a href=\"https:\/\/optinmonster.com\/docs\/how-to-hide-optinmonster-from-existing-newsletter-subscribers\/\" target=\"_blank\" rel=\"noopener noreferrer\" title=\"How to Hide OptinMonster from Existing Newsletter Subscribers\">how to hide OptinMonster from existing newsletter subscribers<\/a>.<\/p>\n\n\n\n\n\n<h2 class=\"wp-block-heading\" id=\"faq\">Troubleshooting<\/h2>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"not-working\">Referrer Detection isn&#8217;t working for my campaign, why?<\/h5>\n\n\n\n<p>Referrer Detection checks if a specific value has been passed as <code>HTTP_REFERRER<\/code> in the browser.<\/p>\n\n\n\n<p>If the <code>HTTP_REFERRER<\/code> passed is empty then Referrer Detection will fail for your campaign and your campaign might not load as you expect.<\/p>\n\n\n\n<p>There are several reasons the <code>HTTP_REFERRER<\/code> could be empty, including if the website visitor:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>entered the site URL in the browser address bar itself<\/li>\n\n\n\n<li>visited the site by a browser-maintained bookmark<\/li>\n\n\n\n<li>visited the site as the first page in the window\/tab<\/li>\n\n\n\n<li>switched from a secure (HTTPS) site to a non-secure (HTTP) site<\/li>\n\n\n\n<li>has security software installed (antivirus\/firewall\/etc) which strips the referrer from all requests<\/li>\n\n\n\n<li>is behind a proxy which strips the referrer from all requests<\/li>\n\n\n\n<li>visited the site programmatically without setting the referrer header<\/li>\n<\/ul>\n\n\n\n<div class=\"alert-box alert-blue\">\n<p class=\"alert-box-title\"><\/p>\n\n\n\n<p>In all instances, we strongly recommend that you thoroughly test your campaign&#8217;s functionality when configuring referrer detection in the Display Rules to ensure your settings are working as expected.<\/p>\n\n\n\n<p class=\"is-style-arrow-link has-link-color\"><\/p>\n<\/div>\n\n\n\n<h5 class=\"wp-block-heading\">Why doesn&#8217;t this work when the visitor switches from a secure (HTTPS) to a non-secure (HTTP) site?<\/h5>\n\n\n\n<p>By default, the referrer data is not passed when the visitor reaches a non-secure (HTTP) site from a secure (HTTPS) site.<\/p>\n\n\n\n<p>For advanced users, if you have access to the site your visitors are coming from, you can resolve this issue by adding the following meta tag to the head of the secure (HTTPS) site.<\/p>\n\n\n\n<p><a href=\"https:\/\/moz.com\/blog\/meta-referrer-tag\" target=\"_blank\" rel=\"nofollow noopener\">This article about the Referrer Meta Tag<\/a> provides context on how this works and examples of the various meta tags available for this purpose.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>OptinMonster makes it easy to show campaigns to visitors who have been referred to your site from another specific website. In this article, you&#8217;ll learn how to use OptinMonster&#8217;s Referral Detection rule. Some situations you might find the Referral Detection rule especially useful include: Referral Detection Targeting To target your campaign to visitors who have&nbsp;&hellip;<\/p>\n","protected":false},"author":4657,"comment_status":"open","ping_status":"closed","template":"","documentation\/categories":[28201],"documentation\/tags":[31399,31498,31415,31411,31401,31455],"class_list":["post-112479","optinmonster_docs","type-optinmonster_docs","status-publish","hentry","categories-display-rules"],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/optinmonster.com\/wp-json\/wp\/v2\/documentation\/112479","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/optinmonster.com\/wp-json\/wp\/v2\/documentation"}],"about":[{"href":"https:\/\/optinmonster.com\/wp-json\/wp\/v2\/types\/optinmonster_docs"}],"author":[{"embeddable":true,"href":"https:\/\/optinmonster.com\/wp-json\/wp\/v2\/users\/4657"}],"replies":[{"embeddable":true,"href":"https:\/\/optinmonster.com\/wp-json\/wp\/v2\/comments?post=112479"}],"version-history":[{"count":20,"href":"https:\/\/optinmonster.com\/wp-json\/wp\/v2\/documentation\/112479\/revisions"}],"predecessor-version":[{"id":206412,"href":"https:\/\/optinmonster.com\/wp-json\/wp\/v2\/documentation\/112479\/revisions\/206412"}],"wp:attachment":[{"href":"https:\/\/optinmonster.com\/wp-json\/wp\/v2\/media?parent=112479"}],"wp:term":[{"taxonomy":"categories","embeddable":true,"href":"https:\/\/optinmonster.com\/wp-json\/wp\/v2\/documentation\/categories?post=112479"},{"taxonomy":"internal_tags","embeddable":true,"href":"https:\/\/optinmonster.com\/wp-json\/wp\/v2\/documentation\/tags?post=112479"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}