Allow Regex in PX URL Rules

Background: Sometimes you need to account for multiple, specific variations of a URL with a combination of IS and IS NOT rules. You also may not know all variations of a URL, leaving a risk that your rule allows for problematic matches. 

Problem: We can often get there with PX’s existing wildcard functionality, but it can take many layered URL rules to accomplish what a single Regex rule can do. Here’s an example:

  • For a URL-based feature in the Product Mapper, let’s say there are multiple pages we want to map that are all under the following base route: /energyhr#/energybi/reports/, where the page name after reports/ could be allnew, or a numeric ID of a specific report which could look something like 10012438
  • To track a specific report via a feature (the reports/10012438 scenario), you would need to use at least three URL rules, connected by an AND operator:
    • URL IS */energyhr#/energybi/reports/* 
    • URL IS NOT */energyhr#/energybi/reports/all
    • URL IS NOT */energyhr#/energybi/reports/new
  • You could condense these three statements into one using Regex: \/energyhr#\/energybi\/reports\/\d{8}

Request: Allow the use of Regex (regular expressions) in PX’s URL rules for Product Mapping and Engagement segmentation. This would save time while building URL rules, as well as make for more robust ones that can account for a wider range of URL variations. 

Read more here: Source link