The condition "URL contains" is easy to set up, but cannot be used when we want to target the exact URL.


So, how do we ensure that when we want to target "example.com/page", URLs such as "example.com/page/subpage" or "subdomain.example.com/page2" won't get targeted?


Using the condition type "URL regular expression" we can set up this rule. In a regular expression:

  • sign ^ indicates that there must be nothing before our condition value
  • sign $ indicates that there must be nothing after our condition value
  • all special signs (such as . or /) must have sign "\" before them


We will set up the condition "URL regular expression" with value "^example\.com\/page$". This ensures that only the exact match URL gets targeted.