Page URL in Google Tag Manager

Viewed 85

How can I make this looks better in one line maybe, Instead of using four lines.

Screenshot

1 Answers

By either using a regex or just contains. I would go with a regex. Just test it well. Something like this: sub\.domain\.com\/en(\/|#){0,2}$ I removed the protocol because it's not essential there. You will get it anyway in your GA call, so easy to manipulate the data as you wish.

Tested here: https://regex101.com/r/ZjqXnu/3

Related