Analytics
2.3K members online now
2.3K members online now
Ask questions about filter set-up and issues with using filters in Google Analytics reports
 
Guide Me
star_border
Reply

Wildcard URLs- Combine page data

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I have pages on my site that the user id for the person that logs in. Each person has a unique ID. I want to get the data associated with a particular page but the problem is the URL for each person is different even if its the same content. Example for the device page:

 

users/1/devices

users/2/devices

users/3/devices

 

Id like to take all three pages above and combine it to only show as one line item (/devices) and track that page all together. Any suggestions on how to do that? Maybe with filters?

1 Expert replyverified_user

Wildcard URLs- Combine page data

Explorer ✭ ✭ ☆
# 2
Explorer ✭ ✭ ☆

You need to create a Custom Filter of the type Advanced.

 

In Field A -> Extra A, select the Request URI field. In the text box, enter "users/([\d]+)/devices" without quotes.

 

In Output To -> Constructor, select the Request URI field. In the text box, enter "users/userId/devices" without quotes

 

This will replace all occurences of the user id with the text string "userId".

 

Remember to test it first on a separate view before implementing.

Wildcard URLs- Combine page data

Top Contributor
# 3
Top Contributor

Non-filter solution

You could use Content Grouping

 

Filter solution

Replace the userid part with nothing

Remember to have an unfiltered view to keep your data safe

 


--
To make bad day worse, spend it wishing for the impossible

Wildcard URLs- Combine page data

Visitor ✭ ✭ ✭
# 4
Visitor ✭ ✭ ✭

Does this take time to implement or should I see the result right away? Thanks for your help!

 

Re: Wildcard URLs- Combine page data

Explorer ✭ ✭ ☆
# 5
Explorer ✭ ✭ ☆

It'll apply to all data from the moment the filter is created and you should be able to see the effect in real time reports.