I have a phpBB forum and I want to merge the different urls Google Analytics throws up into 1, eg:
/forum/viewtopic.php?f=16&t=6457
/forum/viewtopic.php?t=6457
/forum/viewtopic.php?f=16&t=6457&start=40
I'd like them all to point to
/forum/viewtopic.php?t=6457
I devised the following regEx filter:
Search and replace -> filter field: Request URI
Search string: \/forum\/viewtopic\.php\?f=([0-9]*)&t=[0-9]
Replace string: \/forum\/viewtopic\.php\?t=([0-9]+)$
It doesn't work, I am not sure what I am missing here. Any help?
?f=([0-9]*)
it forcesf=
to be there, so your second URL will not match as it has?t=6457
. And when you do&t=[0-9]
the[0-9]
means a single character taken from the set of 0 to 9, so in your first URL&t=6457
won't match the regex as it has 4 characters, not one. You need[0-9]+
to match multiple digits. – Patrick Mevzek Sep 19 '19 at 22:57