OptinMonster Documentation

Documentation, Reference Materials, and Tutorials for OptinMonster

Home

Docs

How to Show or Hide Your Campaigns on Specific Pages

How to Show or Hide Your Campaigns on Specific Pages

OptinMonster makes it easy to show or hide your campaigns on specific pages using our Display Rules.

In this article, you’ll learn how to show or hide your campaigns on specific pages.

Before you start, targeting campaigns by URL Path is included with all subscription plans.

The URL path is a specific portion of a web page’s URL, but not the full URL. The URL path is the text after the domain and before any query arguments or anchors.
URL Structure

This article includes the following examples:

  • Show a campaign only on specific language pages when using the WordPress Multilingual (WPML) plugin
  • Display a campaign when the URL matches a specific pattern using RegEx

Configure Display Rules

When you create a campaign in OptinMonster you may want to show or hide it on specific pages of your site. This is easy to do using OptinMonster’s Display Rules.

To show or hide your campaign on specific pages using the URL path, follow these steps:

  1. Navigate to the Display Rules view in the campaign builder.
    Navigate to the Display Rules in the OptinMonster campaign builder.
  2. Next, when adding or editing a rule select Where (Targeting) from the left-hand list and select the Page Targeting option.
    URL Path targeting with OptinMonster.
  3. Configure the current URL Path options as desired using the operator and key fields.
    URL Path options.
    The following options are available for current URL path:
    • is any page
    • is the homepage
    • is not the homepage
    • exactly matches
    • does not exactly match
    • contains
    • does not contain
    • starts with
    • does not start with
    • ends with
    • does not end with
    • matches the pattern
  4. You can quickly add more URL Path conditions by selecting the (+) icon to the right.
    Add more URL Path conditions.
  5. Control if the conditions in the group must ALL be required, or only a single condition needs to be met by toggling the ANY/ALL option above the group.
    Configure the group conditions to be all required or only one.
  6. When you’re finished, Save the campaign.

Examples

Some example configurations are provided below to help get you started.

Show a campaign only on specific language pages when using the WordPress Multilingual (WPML) plugin.

The WordPress Multilingual (WPML) plugin makes it very easy to target campaigns based on the specific language being viewed using the Page Targeting rule in OptinMonster.

The WPML plugin will use a prefix in the URL Path to indicate the language, for example ‘en’ for English, ‘es’ for Spanish, ‘fr’ for French, etc.

To show a campaign only on English pages of your site you would add a Page Targeting condition, ‘current URL Path starts with en’.  Like this:

WPML url path targeting example in OptinMonster.
Display When the URL Matches a Specific Pattern Using RegEx

You can set a rule to show a campaign only on URLs that match a specific pattern using a Regular Expression, or RegEx for short.

“A regular expression is a pattern that the regular expression engine attempts to match in input text. A pattern consists of one or more character literals, operators, or constructs.” – Microsoft

In simpler terms, RegEx looks for characters: be it letters, numbers, or specific symbols to identify a pattern. The results permitted or revoked depend on whether the Input to the Regular Expression Engine matches the pattern being employed by the engine.

For more information about how to set and use display rules in OptinMonster, please refer to our Display Rules guide. You can also check out our RegEx pattern matching guide for comprehensive details on creating and using RegEx patterns.

Looking for more ways to target specific pages and visitors on your site? See how to target campaigns based on URL parameters and query arguments!


If you’re serious about jumpstarting your website business growth, then get started with OptinMonster today!

Get Started With OptinMonster Today!

BONUS: Done-For-You Campaign Setup ($297 value)

Our conversion experts will design 1 free campaign for you to get maximum results – absolutely FREE!

Click here to get started →

Troubleshooting

When adding a path to the page targeting field, I’m getting a message that says ‘Unnecessary URL components have been removed’

Depending on your setup, the Page Targeting rule cannot be used to target any part of a URL that comes after a ‘?’ or a “#’ in the URL path, such as ‘website.com/page?key=value’, or ‘website.com/page#heading’ since these are URL parameters and anchor tags, respectively.

Instead, you will need to use the specific rules for targeting URL parameters and the rules for targeting anchor tags.


Still stuck?

How can we help?

Last updated on


Start Getting More
Leads & Sales Today
with OptinMonster!

Create and launch smart capture forms today in minutes. What are you waiting for?

Create and launch smart capture forms
today in minutes. What are you waiting for?

OptinMonster has transformed our business. Before integrating their optins, our clients saw a 2% conversion rate from web traffic, which is slightly above the standard for their industry. With the integration of OptinMonster’s lightbox popup, exit-intent technology, split testing, and other tools, our client’s conversion rates soared by an unprecedented 500%. They attracted substantially more customers while spending less on digital advertising. Their success propelled them to the top of their markets, outperforming national chains and other medical spas with much bigger marketing budgets. Our client’s success in their market has distinguished us in our own. We are now one of the most sought-after marketing firms in the industry of aesthetic medicine. We know that the integration of OptinMonster, more than any other tool or marketing strategy, has supported this growth and achievement.

chris zelig medstar media

Chris Zelig

Partner, Medstar Media

OptinMonster has been a game-changer for us. From driving donations to collecting new leads, there is nothing that this simple tool has failed to accomplish. Our lead collection rate has jumped by over 1,000%.

joe lowe american bird conservancy

Joe Lowe

Director of Digital Communications, American Bird Conservancy

Through OptinMonster’s exit-intent popups, we have more than doubled our sales conversion rate. Best of all is the compound effect of using OptinMonster over a long period of time—more conversions mean more customers, which means more word of mouth.

mitch smith, managing director, shockbyte

Mitch Smith

Managing Director, Shockbyte.com