Current Page

Current Page

Catch visitors in the moment of browsing a specific page.

Current Page is an OptiMonk targeting condition — called the Current Page / URL rule — that restricts a campaign to appear only on specific pages a visitor is actively browsing, or conversely, suppresses it on pages where it should not show. It is one of the most widely used targeting rules in OptiMonk because almost every campaign has a page context: a cart abandonment message belongs on cart and product pages, a blog content upgrade belongs on blog posts, a category-specific recommendation belongs only on that category. The rule supports several targeting methods depending on your platform. For any store, you can target the homepage directly, or match pages using URL operators — contains, starts with, ends with, exactly matches — and regular expressions for complex multi-condition patterns. For Shopify and Shoprenter stores specifically, semantic page-type targeting is also available: you can target collection pages by collection name, handle, or product count, and product pages by product name, collection membership, price, type, vendor, availability, or tag — without needing to know or manage URL strings. Multiple Current Page conditions can be combined with include and exclude logic, and the rule stacks with all other targeting conditions using AND logic.

Key benefits

  • Match campaigns to the page context where they are most relevant. A campaign shown on the right page — where its message directly relates to what the visitor is already looking at — converts at a substantially higher rate than the same campaign shown sitewide. Current Page targeting gives you the precision to ensure every campaign fires in exactly the context it was designed for, from a homepage welcome offer to a product-specific exit-intent popup to a blog content upgrade.
  • Semantic page targeting on Shopify — no URL management required. For Shopify stores, the Current Page rule understands your store's structure natively. You can target collection pages by collection name or handle, and product pages by attributes like vendor, tag, price range, or availability — without looking up URLs or maintaining URL patterns that break whenever you restructure your store. This semantic layer makes page targeting maintainable at scale across large catalogs.
  • Regular expression support for advanced URL patterns. For teams with complex URL structures — multiple subfolders, dynamic query parameters, UTM-scoped targeting — the Current Page rule supports regular expressions as a targeting method. This allows a single rule to match patterns that would otherwise require many separate "contains" conditions, such as targeting visitors arriving from an email campaign with a specific UTM parameter on a specific set of pages simultaneously.

How it works

Step 1
Open the campaign targeting settings and add a Current Page / URL rule

In your OptiMonk dashboard, select the campaign you want to configure and click Edit settings. Under "Select who should see the popup," click Add new rule and select Current Page / URL from the condition list by clicking the Add sign next to it.

Step 2
Choose your page type and define the matching logic

From the dropdown, select the type of page you want to target. Available options for all stores include: Homepage, and any URL page using operators (contains, starts with, ends with, exactly matches, or matches RegEx). For Shopify and Shoprenter stores, additional semantic options are available: Collection page (match by collection name, handle, or product count) and Product page (match by name, collection, price, type, vendor, availability, or tag). Enter the relevant value — a URL fragment, collection name, product attribute, or RegEx expression — to define the match.

Step 3
Add exclusions if needed, save, and publish

If you want to show a campaign on a broad set of pages but exclude specific ones — for example, all product pages except one specific product — add a second Current Page condition in exclude mode with the exact URL of the page to suppress. Click Save when finished. OptiMonk evaluates the visitor's current page URL against your rule at display time, showing the campaign only when there is a match and silently suppressing it on all other pages.

Frequently asked questions

What is the Current Page / URL rule in OptiMonk?+

The Current Page / URL rule is a targeting condition that restricts a campaign to appear only on specific pages — or excludes it from specific pages — based on the URL the visitor is currently browsing. It supports homepage targeting, URL pattern matching (contains, starts with, ends with, exact match, and regular expressions), and — for Shopify and Shoprenter stores — semantic targeting of collection pages and product pages by their attributes rather than their URLs.

What URL operators are available for page targeting?+

For URL-based targeting, OptiMonk provides five operators: "contains" (the URL includes a specific string anywhere), "starts with" (the URL begins with a specific string), "ends with" (the URL ends with a specific string), "exactly matches" (the URL is identical to the entered value), and "matches RegEx" (the URL matches a regular expression pattern). These cover the full range of URL structures from simple path matching to complex multi-parameter targeting.

How is Shopify page targeting different from URL targeting?+

On Shopify and Shoprenter, the Current Page rule offers semantic page-type options that operate independently of URL strings. For collection pages, you can match by collection name, collection handle, or number of products in the collection. For product pages, you can match by product name, collection membership, price range, product type, vendor, availability, or product tag. These attribute-based rules remain accurate even if you change a collection's URL handle or reorganize your Shopify catalog — the rule matches by meaning, not by URL text.

Can I exclude specific pages while targeting a broader set?+

Yes. You can combine include and exclude conditions in the same campaign. For example, to show a campaign on all product pages except one specific product, you would add one Current Page condition set to include (URL contains /products/) and a second set to exclude (URL exactly matches the specific product's URL). OptiMonk evaluates both conditions together — the campaign fires only when the include rule matches and the exclude rule does not.

Can I use regular expressions for Current Page targeting?+

Yes. When selecting a generic page type from the dropdown, you can choose "matches RegEx" as the operator and enter a regular expression pattern. This is useful for complex targeting scenarios — for example, matching pages that have both a specific path segment and a specific UTM parameter in the URL simultaneously, which would be cumbersome to express with multiple "contains" rules. OptiMonk recommends testing your RegEx expressions at regex101.com before applying them to a live campaign.

Ready to try it?

Try OptiMonk for free

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

targeting