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

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

Issue Writing an API Advanced Filter: Site Directories (Categories)

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

My site has several editorial categories, and GA allows me to parse site content by these categories:


Image Link 1, images embedding is broken for me for some reason


I am also able to further filter this data (unique pageviews btw) with an advanced filter in GA:


Image Link 2


I want to pull this same segment of people (unique pageviews who visited pages within the "/fashion/" category) into Google Sheets so that I can manipulate the data -- but I'm struggling figuring out how to write this Advanced Filter correctly.


I have tried to figure out the correct regex for  the filter, but nothing returns the correct values. For the Custom Dimension, Query Explorer revealed to me that this is written as "ga:dimension1."


Does anyone know what I might use for the filter? Thank you sincerely for any help.

1 Expert replyverified_user

Re: Issue Writing an API Advanced Filter: Site Directories (Categories

Top Contributor
# 2
Top Contributor
Hi Nathan,

image upload is broken for everyone, unfortunatelySmiley Happy

Ok fetching a report with a filter should be done as:
This is for your case where you say Dimension one exactly matches Fashion.

Other operators are available regex contains or not and more.

Other question is do you already have a custom segment created so you want to pull data for it? Or you just wany to pull data for users which were exposed to a specific value of CD1?

Kind regards,
Web analyst @