Skip to main content

Use the Current Page URL rule

Create rules to target a Slot based on the URL where it’s displayed.

Updated over a week ago

The Current Page URL rule enables you to display or hide content based on the URL of the page a visitor is currently viewing, improving user experience.

For example, imagine you have a website with different sections: a homepage, support, and product pages. You want to show a special offer popup only on the product pages. Using the Current Page URL rule, you can set the popup to appear only when the URL contains product-page. This way, visitors will see the special offer only when they are on the product page, making the offer more relevant to them.

Ways to target the URL include:

  • Protocol

  • Domain

  • Path

  • Query

  • Full URL


URL breakdown

URLs can be broken down into several constituent parts, for example, take this full URL:

Component

Description

https

protocol

findyourperfectholiday.co.uk

domain

/find

path

?SearchText=searchterm&param2=test

all query parameters (SearchText, param2)

#!display=list

URI fragment (which we don't currently target explicitly)

For example, if you want to target for people searching for 'searchterm', you could use the Query option in the URL rule:


Add multiple rules

Be as specific as you can and add multiple rules if necessary, as this helps avoid false positives.

For example, if you checked the full URL for 'find', in order to display something on the search results page, it would match all pages, because the the same four characters appear in the domain findyourperfectholiday.co.uk.

A better option is to use a path match instead:

Did this answer your question?