Exact match in branching using "contains" option | XM Community
Skip to main content

Hi all,
I am setting up embedded data based on URL, and want to use certain URL parameters. The problem I am facing is the following.
What I want:

Branch if URL contains /product1/

ED`=Product1

Branch if URL contains product1-updates

ED=Product 1 Updates


Is it possible to make a filter with exact match including / sign?

One option could be to use nested conditions. So the flow would be:

  1. If URL contains "Product 1"; Assign ED=A

  2. If URL contains "Updates"; Change ED from A to B.

The other option could be to use "matches regex". In regex
$
stands for the end of the line.
  • Product 1$
    : Would match "Product 1", but not "Product 1 Updates"

  • Product 1\\d|\\D+$
    : Would match "Product 1 Updates" but not "Product 1"

More on Regex here


Thank you ahmedA Will have a look at it.


Leave a Reply