Filter to strip out entire query string
This popular discussion was copied from the former Help Forum, answered by
in one of my GA views I need to strip out all query string parameters using filter.
I was advised to create search and replace filter with the following configuration:
Dimension: Request URI
Search String: ^([^\?]+)\?.*
Replace String: \1
I am looking at "Replace String" I don't get what it means "\1". Can anyone help me understand how this filter works?
Whims, thank you for your reply!
Actually, it seems to be working as expected in my test view, but I didn't understand why initially.
Now I discovered, that "\1" is actually "back reference" for everything what matches regular expression "[^\?]+" - in the brackets.
So my filter works as that it extracts content from the RequestURl before "?" sign, and replaces entire Request URl with this substring.
After some investigation I found these discussions, which other people may also find useful:
2) Info about Regexp Back-references:
given by Whims/vgrinko14 (TC/member)