For Matomo outgoing link tracking I need the regex pattern, which matched the following URLs: https://www.example.com/product/?sku=12345&utm_source=123456789
and
https://www.example.com/product/?utm_source=123456789
"https://www.example.com/" and "utm_source=123456789" are always fixed in the URL, just "product/" or "category/product/" change and must replaced by regex pattern.
Thanks
Maybe this example can help you reach your goal:
It looks for any characters between these two groups:
https://www.example.com/utm_source=123456789Given the examples:
https://www.example.com/product/?sku=12345&utm_source=123456789https://www.example.com/product/?utm_source=123456789Your matches would be:
product/?sku=12345&product/?