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

Filter which covers a hostname and request URI

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi there,

I have a website which I need to create a filtered view on. For instance, my website is:

 

example.com

 

I want to create a view that only includes traffic matching:

example.com/my-blue-widget AND mybluewidget.example.com.

So I should see all traffic associated with /my-blue-widget AND mybluewidget.example.com within this one view.

What would be the best way to tackle this?


1 Expert replyverified_user

Re: Filter which covers a hostname and request URI

Top Contributor
# 2
Top Contributor

Follow instructions, in orderly fashion:

  1. Create a new view called My Blue Widget
  2. Create filter
    1. Name: MBW folder
    2. Type: Custom, Advanced
    3. Field A: Request URI: (/my-blue-widget.*)
    4. Output to: /mbw$A1
  3. Create filter
    1. Name: MBW subdomain
    2. Type: Custom, Advance
    3. Field A: Hostname: mybluewidget.example.com
    4. Field B: Request URI: (.*)
    5. Output to: /mbw$A1
    6. Check box that says Field B required
  4. Create filter
    1. Name: Include only MBW
    2. Type: Custom, Include
    3. Field: Request URI: /mbw

The order of filters is very important.

 

VP & Chief Evangelist at Hub'Scan | Contact me
Level 80 Digital Analytics Warrior, KPI Therapist and Keeper of the One True Tagging Plan

Filter which covers a hostname and request URI

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Hey,

 

That's awesome - thank you! Just a quick question. On the Output To -> Constructor, am I outputting to the request URI?

 

Thanks,

Marked as Best Answer.
Solution
Accepted by topic author Holly E
March

Filter which covers a hostname and request URI

Top Contributor
# 4
Top Contributor

for filters 1 and 2, yes

 

VP & Chief Evangelist at Hub'Scan | Contact me
Level 80 Digital Analytics Warrior, KPI Therapist and Keeper of the One True Tagging Plan

Re: Filter which covers a hostname and request URI

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭

Hi there,

I have implemented this but unfortunately the subfolders on my subdomain (mybluewidget.example.com) are being overwritten. For example, if a user visits:


mybluewidget.example.com/some-page

 

It is shown within Google Analytics as mybluewidget.example.com/mbw.

I have ticked 'Override Output Field' as the filters do not work otherwise (this has been confirmed in Real Time analytics)

Filter which covers a hostname and request URI

Top Contributor
# 6
Top Contributor

I apologize, my second filter should have read:

 

Create filter
Name: MBW subdomain
Type: Custom, Advance
Field A: Hostname: mybluewidget.example.com
Field B: Request URI: (.*)
Output to: /mbw$B1
Check box that says Field B required

VP & Chief Evangelist at Hub'Scan | Contact me
Level 80 Digital Analytics Warrior, KPI Therapist and Keeper of the One True Tagging Plan