I have a lot of similar URLs that I would like to merge in Google Analytics. I've managed to merge a lot of them already. However I've now run into a bit of a problem.
I have URLs that look something like this;
article/4567/edit
article/87478548/edit
article/82984786/add
article/8374/add
How would I go about merging these URLs so that they display as;
article/edit
article/add
Any help is greatly appreciated.
EDIT: I also need to be able to have GA display every article in one line on the table called "article/" regardless of any ID that is after it. I don't want the table to look like:
article/12342 1,000 views
article/7465890 900 views
I need it to display as:
article/ 1,900 views
You can create an Advanced filter that combines the relevant parts for you:
The output would be /article/edit
or /article/add
, with everything and anything between those removed.
EDIT:
If you just want everything, regardless of /edit
, /add
, /12341/edit
, /7305/add
, /whatever/edit
, to show up just as /article
, then you can just change your filter like this:
Field A
: Request URI = (/article)/.*
Output to
: Request URI = $A1
This will convert the following examples:
- /article/123/edit -> /article
- /article/2345/add -> /article
- /article/anything -> /article
From this Combining similar URLs in Google Analytics you can find out how to do it. You need to use a regex. Something like this should work (did not test it).
(article\/)[0-9]*\/(edit|add)