To show a popup on a specific page, give it a page rule: pick the products or collections it belongs to, or write a URL rule that matches the page’s address, such as everything starting with /collections/sale. Everywhere the rule does not match, the popup never arms. On Shopify the page addresses follow a fixed pattern, which makes rules easy to write once you know it.

Key takeaways

  • Choose the narrowest rule that covers your pages: a product picker for a handful of products, a collection for a product range, a URL rule for everything else.
  • Use an exclusion rule (“everywhere except”) when the popup belongs on most pages but must stay off a few, such as the cart.
  • Remember that language versions of your store live at different addresses, so a rule for /cart does not cover /fr/cart.
  • Check every target page and one page that should not show the popup, in a private window, before you call it done.

How Shopify page addresses work

Every Shopify store uses the same address pattern for its pages, so you can write a page rule without guessing. The part after your domain tells you what kind of page it is:

Page typeAddress starts withExample
Product page/products//products/linen-shirt
Collection page/collections//collections/summer-sale
Content page/pages//pages/about
Blog post/blogs//blogs/news/spring-lookbook
Cart/cart/cart

Two details catch people. A product reached from a collection can show both in the address, as in /collections/summer-sale/products/linen-shirt. And if your store sells in several languages, the language usually comes first, as in /fr/products/linen-shirt. A rule written for one shape of address misses the other.

Step 1: write down where the popup belongs

Before you open any settings, write the list of pages in plain words. “Every product in the coffee collection”, “the about page”, “every page except the cart” are all clear targets. “Product pages where people hesitate” is not, and no rule can express it.

Then match each target to a page type from the table. This tells you which kind of rule you need in step 2, and it shows early when one popup is trying to cover two unrelated groups of pages. If it is, make two popups.

The offer should fit the page. An add-on for one product belongs on that product’s page; if that is your plan, the guide to cross-selling specific products in Shopify covers how to choose which product to offer next to which.

Step 2: choose how to target the pages

There are three ways to point a popup at pages, and each one fits a different list.

Pick products or collections

Picking from your catalog is the most reliable rule for product pages, because it does not depend on how the address is written. A product picked by name stays matched even when the shopper arrives through a collection link.

Pick collections when the popup belongs to a whole range. A collection rule normally covers the collection page itself and the product pages of the products in it, so new products added to the collection pick up the popup without another edit.

Write a URL rule

A URL rule matches the address, so it works for any page type, including content pages, blog posts and pages from other apps. There are usually three kinds of match:

  • Equals matches one exact address, such as /pages/about.
  • Starts with matches a whole section, such as /blogs/ for every blog post or /products/ for every product page.
  • Contains matches the text anywhere in the address, which is the one to use when a language prefix such as /fr/ may come first.

In PopupGenius, for on-brand upsell and email popups on your website, these choices sit under “Visibility” in the popup’s Workflow tab: “Specific product pages” and “Specific collections” use the Shopify product and collection pickers, and “Pages matching a URL rule” takes up to 10 rules with “Equals”, “Starts with” or “Contains”. You can paste a full link into a rule. The domain, anything after a question mark and capital letters are ignored.

Leave it on all pages

All pages is the right choice for a site-wide announcement or a welcome offer, but it is a choice, not a default to forget. A popup with no page rule competes with every other popup on every page.

Step 3: exclude the pages where the popup should never appear

An exclusion rule is the reverse of a URL rule: the popup can appear everywhere except on the pages you list. Use it when the list of pages to avoid is shorter than the list of pages to cover.

The cart is the usual example. A newsletter popup over the cart pulls attention from a purchase the shopper is about to make, so “all pages except /cart” keeps the popup site-wide while leaving the cart clear. Other candidates are a contact page, a returns page, or a landing page that already has its own form.

Exclusion rules match the full path. If your store has language versions, /cart and /fr/cart are different addresses, so add one rule for each, or use “Contains” with /cart and accept that it also matches any other address containing that text.

Step 4: decide which popup owns each page

Most popup tools show one popup per page at a time, so when two popups could both appear on the same page, one of them wins. Plan that on purpose rather than discovering it later.

PopupGenius arms one popup per page view and picks the most recently published popup whose page rule includes that page. A site-wide popup published last will therefore cover a product-page popup published earlier. The fix is to narrow the site-wide popup with an exclusion rule for the product pages, or to publish the narrower popup again so it moves to the front.

A simple plan is a list with one line per page type: which popup owns it, and which popups are excluded from it. If the cart page belongs to an add-on offer, the upsell popup at add to cart guide explains how to set that offer up so it does not fight an email popup for the same page.

Step 5: add a device rule if the page behaves differently on phones

Page rules decide where a popup can appear; a device rule decides on which screen sizes. Use one when the page itself changes on a phone, such as a long product page where a centered popup would cover the add to cart button.

A device rule usually reads the width of the browser window, not the kind of device. In PopupGenius, “Mobile Only” means a window 768 pixels wide or narrower, so a narrow window on a laptop counts as mobile. Keep that in mind when you test on your computer.

How to check the popup shows on the right pages

Test the rule with a browser that has no memory of earlier tests. Popups remember who has seen them, so your normal browser can hide a working popup from you.

  1. Publish the popup, or publish the update if it is already live. Edits to a live popup often wait as a draft until you do.
  2. Open a private window and visit each target page. Wait for the trigger and confirm the popup opens.
  3. Visit at least one page that should not show the popup, such as the cart or the home page, and wait just as long. Nothing should open.
  4. If your store has language versions, repeat one target page and one excluded page in a second language.
  5. Open the private window again for each new round, because a popup you closed in one round may stay closed for the rest of that visit.

Why a popup shows up on the wrong page

When a popup appears somewhere it should not, the page rule is usually right and something else is opening it.

  • A checkout or add to cart trigger. These triggers can follow the shopper to the cart page. A popup that opens when checkout starts, or one whose theme reloads the page on add to cart, can appear on the cart even when its page rule names only product pages. Excluding the cart with an exclusion rule stops both.
  • An emptied product selection. If you clear the products or collections from a picker rule, many tools treat the popup as unrestricted. Pick at least one, or switch to a URL rule.
  • A missing language prefix. A rule that starts with /products/ does not match /fr/products/. Use “Contains” when the store has language versions.

And when a popup does not show where it should, check for a newer popup that owns the same page before you change the rule.

FAQ

Can I show a popup on just one product page?

Yes. Pick that one product in a product rule, or write a URL rule with “Equals” and the product’s address, such as /products/linen-shirt. The product rule is safer, because it also matches the product when the shopper arrives through a collection link.

How do I hide a popup on the cart page only?

Use an exclusion rule: all pages except those matching /cart. If your store has language versions, add the translated cart address too, or use “Contains” with /cart. The popup then stays everywhere else and never opens on the cart.

Can two popups show on the same page?

Usually not at the same time. Most tools, PopupGenius included, show one popup per page view and pick the newest published one that fits the page. Give each popup its own pages with page rules so they do not compete.