{"id":128121,"date":"2023-07-10T11:43:24","date_gmt":"2023-07-10T15:43:24","guid":{"rendered":"https:\/\/optinmonster.com?p=128121&#038;post_type=optinmonster_docs&#038;preview_id=128121"},"modified":"2025-08-08T13:51:15","modified_gmt":"2025-08-08T17:51:15","slug":"how-to-target-optinmonster-campaigns-to-visitors-who-viewed-a-specific-page","status":"publish","type":"optinmonster_docs","link":"https:\/\/optinmonster.com\/docs\/how-to-target-optinmonster-campaigns-to-visitors-who-viewed-a-specific-page\/","title":{"rendered":"How to Target OptinMonster Campaigns to Visitors Who Viewed a Specific Page"},"content":{"rendered":"\n<p>OptinMonster makes it easy to show campaigns to visitors only after they have or have not viewed a specific page of your site.<\/p>\n\n\n\n<p>In this article, you&#8217;ll learn how to use the Pages Visited Display Rule in OptinMonster.<\/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 requires a <a href=\"https:\/\/optinmonster.com\/pricing\" target=\"_blank\" rel=\"noopener\" title=\"Pro and higher subscription\">Growth subscription<\/a>.<\/p>\n<\/div>\n<\/div>\n\n\n\n<p><em><strong>The URL path is a specific portion of a web page\u2019s URL<\/strong><\/em>, <em>but not the full URL<\/em>. The URL path is the text after the domain and before any query arguments or anchors.<br><img decoding=\"async\" class=\"alignnone size-full wp-image-172485\" src=\"https:\/\/optinmonster.com\/wp-content\/uploads\/2021\/10\/url-structure.jpg\" alt=\"URL Structure\" width=\"800\" height=\"222\" srcset=\"https:\/\/optinmonster.com\/wp-content\/uploads\/2021\/10\/url-structure.jpg 800w, https:\/\/optinmonster.com\/wp-content\/uploads\/2021\/10\/url-structure-300x83.jpg 300w, https:\/\/optinmonster.com\/wp-content\/uploads\/2021\/10\/url-structure-768x213.jpg 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Configure Pages Visited Rule<\/h2>\n\n\n\n<p>When you&nbsp;<a href=\"https:\/\/optinmonster.com\/docs\/creating-your-first-optin\/\" target=\"_blank\" rel=\"noopener\" title=\"\">create a campaign<\/a> in OptinMonster that you want to show to visitors only after they have or haven&#8217;t viewed specific page(s) of your website you can use our Display Rules to do so.<\/p>\n\n\n\n<p>To configure the Pages Visited rule, 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>OnSite Retargeting<\/strong>&nbsp;from the left-hand list and select <strong>Has Visited a Page<\/strong> or <strong>Has Not Visited a Page<\/strong> from the Personalization menu.<br><img decoding=\"async\" width=\"800\" height=\"564\" class=\"alignnone size-full wp-image-180368\" src=\"https:\/\/optinmonster.com\/wp-content\/uploads\/2023\/04\/has-visited-rule.jpg\" alt=\"Target your campaigns based on specific pages visited.\" srcset=\"https:\/\/optinmonster.com\/wp-content\/uploads\/2023\/04\/has-visited-rule.jpg 800w, https:\/\/optinmonster.com\/wp-content\/uploads\/2023\/04\/has-visited-rule-300x212.jpg 300w, https:\/\/optinmonster.com\/wp-content\/uploads\/2023\/04\/has-visited-rule-768x541.jpg 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><br>The following options are available for Page View targeting:\n<ul class=\"wp-block-list\">\n<li><strong>URL Operators<\/strong>\n<ul class=\"wp-block-list\">\n<li>is the homepage<\/li>\n\n\n\n<li>exactly matches<\/li>\n\n\n\n<li>contains<\/li>\n\n\n\n<li>starts with<\/li>\n\n\n\n<li>ends with<\/li>\n\n\n\n<li>matches the pattern (RegEx)<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Days Operators<\/strong>\n<ul class=\"wp-block-list\">\n<li>Within the last (days)<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Once you&#8217;ve selected the specific option you would like to use you&#8217;ll be provided with configuration options specific to that feature.<br><img decoding=\"async\" width=\"800\" height=\"169\" class=\"alignnone size-full wp-image-180367\" src=\"https:\/\/optinmonster.com\/wp-content\/uploads\/2023\/04\/has-visited-options.jpg\" alt=\"Configure the Has Visited rule in OptinMonster.\" srcset=\"https:\/\/optinmonster.com\/wp-content\/uploads\/2023\/04\/has-visited-options.jpg 800w, https:\/\/optinmonster.com\/wp-content\/uploads\/2023\/04\/has-visited-options-300x63.jpg 300w, https:\/\/optinmonster.com\/wp-content\/uploads\/2023\/04\/has-visited-options-768x162.jpg 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/li>\n\n\n\n<li>When you&#8217;re finished, click&nbsp;<strong>Save<\/strong>.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">FAQs<\/h2>\n\n\n\n<h5 class=\"wp-block-heading\">What should I enter in the Url field?<\/h5>\n\n\n\n<p>This field accepts only a valid URL Path.<\/p>\n\n\n\n<p>The URL path is a specific portion of a web page\u2019s URL, <em>but not the full URL<\/em>. The URL path is the text after the domain and before any query arguments or anchors.<br><img decoding=\"async\" class=\"alignnone size-full wp-image-172485\" src=\"https:\/\/optinmonster.com\/wp-content\/uploads\/2021\/10\/url-structure.jpg\" alt=\"URL Structure\" width=\"800\" height=\"222\" srcset=\"https:\/\/optinmonster.com\/wp-content\/uploads\/2021\/10\/url-structure.jpg 800w, https:\/\/optinmonster.com\/wp-content\/uploads\/2021\/10\/url-structure-300x83.jpg 300w, https:\/\/optinmonster.com\/wp-content\/uploads\/2021\/10\/url-structure-768x213.jpg 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/p>\n\n\n\n<div class=\"alert-box alert-yellow\">\n<p class=\"alert-box-title\">Note:<\/p>\n\n\n\n<p>Entering the full URL (including domain), a query argument or an anchor into the Url field will cause the targeting to fail. Only valid URL paths are accepted. It is not possible to target query arguments or hashes with this Display Rule.<\/p>\n\n\n\n<p class=\"is-style-arrow-link has-link-color\"><\/p>\n<\/div>\n\n\n\n\n\n<h2 class=\"wp-block-heading\">Troubleshooting<\/h2>\n\n\n\n<h5 class=\"wp-block-heading\">I have a Single Page Application I&#8217;m using OptinMonster with but this rule isn&#8217;t working for me.<\/h5>\n\n\n\n<p>Sometimes, this rule may not work as expected on SPA sites. If you&#8217;re experiencing this issue please <a href=\"https:\/\/optinmonster.com\/docs\/getting-support-for-optinmonster\/\" target=\"_blank\" rel=\"noopener\" title=\"\">submit a support ticket<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>OptinMonster makes it easy to show campaigns to visitors only after they have or have not viewed a specific page of your site. In this article, you&#8217;ll learn how to use the Pages Visited Display Rule in OptinMonster. The URL path is a specific portion of a web page\u2019s URL, but not the full URL.&nbsp;&hellip;<\/p>\n","protected":false},"author":4657,"comment_status":"open","ping_status":"closed","template":"","documentation\/categories":[28201],"documentation\/tags":[31399,31498,31415,31459,31411],"class_list":["post-128121","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\/128121","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=128121"}],"version-history":[{"count":22,"href":"https:\/\/optinmonster.com\/wp-json\/wp\/v2\/documentation\/128121\/revisions"}],"predecessor-version":[{"id":206397,"href":"https:\/\/optinmonster.com\/wp-json\/wp\/v2\/documentation\/128121\/revisions\/206397"}],"wp:attachment":[{"href":"https:\/\/optinmonster.com\/wp-json\/wp\/v2\/media?parent=128121"}],"wp:term":[{"taxonomy":"categories","embeddable":true,"href":"https:\/\/optinmonster.com\/wp-json\/wp\/v2\/documentation\/categories?post=128121"},{"taxonomy":"internal_tags","embeddable":true,"href":"https:\/\/optinmonster.com\/wp-json\/wp\/v2\/documentation\/tags?post=128121"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}