AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

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

How do I combine / and /en-us/

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

In my reports traffic coming to mywebsite.com/ and mywebsite/en-us/ are appearing separately.

 

I would like these to be combined. How can I set up a filter to do this?

 

Thanks.

1 Expert replyverified_user

How do I combine / and /en-us/

[ Edited ]
Rising Star
# 2
Rising Star

How do these two pages appear in the All Pages report?

 

You can use a Search and Replace filter with a Filter Field of Request URI, then use the Search String and Replace String boxes to define what to search for and replace with. Use the values as they appear in the All Pages report, plus use regular expression like so:

 

/$ where the dollar sign means ends with, if this is the intended action. Or ^/ where the caret symbol means begins with

 

Let me know if that helps. Info on regular expression below.

 

https://support.google.com/analytics/answer/1034324?hl=en

How do I combine / and /en-us/

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Search: ^/$

Replace: /en-us/

 

This seems to do what I want. Thanks.

How do I combine / and /en-us/

Rising Star
# 4
Rising Star

No worries. Glad it was useful.

 

If you'd like to test it before pushing it live in the main view, copy the main view and implement it in the copied view. If you're happy with the result after a few days, then implement it in the main view.