Skip to main content

Page Targeting (URL): Overview

Overview of Promolayer's URL-based page targeting and exclusion rules, including match types and how target/exclusion rules interact.

Promolayer can show or hide a display on specific pages using URL rules.

How it works

Set rules under 'Show on these pages' and 'Don't show on these pages'. Each rule uses a match type to compare against the current page URL.

Quick usage examples

Be sure to check the correct URLs on your own website and replace the match text in examples as needed.

  • Show everywhere
    Leave all rules blank.

  • Show on homepage and nowhere else
    'Show on these pages'
    Match type -> URL Equals
    Match text -> https://mysite.com/

  • Display everywhere except for cart and checkout
    'Don't show on these pages'
    Match type -> URL Contains
    Match text -> cart

    'Don't show on these pages'
    Match type -> URL Contains
    Match text -> checkout

    Please check your own website to find the correct name for your checkout and cart page.

  • Display for all pages within a certain category
    'Show on these pages'
    Match type -> URL Starts with
    Match text -> https://mysite.com/my-category/

  • Target a specific Google campaign
    'Show on these pages'
    Match type -> URL Contains
    Match text -> utm_campaign=mycampaign

If you need a specific example that isn't listed here please reach out to us via live chat. We would be happy to add to this list!

Options

Match type

Behavior

URL Equals

Matches the URL exactly, excluding search parameters and hash

URL Contains

Matches the full URL, including search parameters and hash

URL Starts with

Matches the beginning of the URL, excluding search parameters and hash

URL Ends with

Matches the end of the URL, excluding search parameters and hash

Notes

  • Exclusion rules always take precedence over target rules.

  • Trailing slashes (slashes at the end of URLs) are ignored for targeting, both with or without should work.

  • Advanced tip: using the 'Contains' match you can target query strings for things like on-site search terms and Google Analytics UTM terms.

  • Need to target by something other than the URL (regular expression, page title, CSS elements, cookies, or JavaScript variables)? See "Advanced Targeting (Pro plan): Overview".

Did this answer your question?