Visited pages
Learn how to define an audience based on the visited pages.
The page variable allows you to create audiences based on the page the user is currently visiting. It includes information such as the path, referrer, query parameters, etc.
For example, you can create an audience of users who are visiting a specific page, such as the pricing page, with the following expression:
page's path is "/pricing"
For multiple paths, you can use the in test:
page's path is in ["/home", "/about", "/contact"]
Similarly, if you want to target users coming from a specific referrer page, such as Google, you can use:
page's referrer is "https://www.google.com/"
When dealing with query parameters, there are two ways to access them in a CQL expression. The first method works when your parameter contains only alphanumeric characters and underscores, such as coupon, product_id, referral, and so on. For example, if you want to match pages that have ?newsletter=daily-news, you can use:
page's query's newsletter is "daily-news"
For non-alphanumeric parameters like coupon-code, you can use the bracket notation:
page.query['coupon-code'] is "10off"
For more information on navigation variables, see the Navigation section.