How can I filter down to see the urls that I want to see in sheets using Google analytics addon?

2,587 views
Skip to first unread message

Alan Lam

unread,
Feb 23, 2016, 6:49:53 AM2/23/16
to google-analytics-spreadsheet-add-on
Hello,

Can anyone help me?

I want to see the metrics of 8 different urls and want to place in it in one column in the report configuration mode.

This is what I have so far (I've kept the filters to three urls to save space in this message but obviously I put 8 in my real report):

Metricsga:avgSessionDuration
ga:transactions
ga:transactionRevenue
ga:newUsers
ga:pageViews
ga:sessions
Dimensionsga:pagePath
Sort
Filtersga:pagePath==/uk/men-clothes

ga:pagePath==/uk/womens-clothes

ga:pagePath==/uk/babies-clothes

The funny thing is it works when I use one url in the filter but breaks when I use 8.

Any guidance would be greatly appreciated?

Thanks in advance


Ryan Praskievicz

unread,
Feb 23, 2016, 10:35:02 AM2/23/16
to google-analytics-spreadsheet-add-on
Hi Alan,

You can try a regex match like this for your filter:

ga:pagePath=~\/uk\/mens-clothes|\/uk\/womens-clothes|\/uk\/babies-clothes


Here is the filter documentation.

Best,
Ryan

Alan Lam

unread,
Mar 15, 2016, 11:02:42 AM3/15/16
to google-analytics-spreadsheet-add-on
Thanks Ryan for taking the time to answer my query. That worked perfectly :)

Lisa

unread,
Nov 27, 2018, 7:09:21 AM11/27/18
to google-analytics-spreadsheet-add-on
Hi all,

What if we are talking 22 URLs to filter?
I tried solution proposed but have got the error that the Reg Exp is too long!

Thanks

Ateeq Ahmad

unread,
Nov 27, 2018, 2:40:59 PM11/27/18
to lisalio...@gmail.com, google-analytics-...@googlegroups.com
Hello Lisa,
remove the equal to sign and use regex match

for my site www.mammalsrus.com, I am using a filter to get home page(/) and all pages with eitheria in them and it runs. The expression is like this


ga:pagePath=~^/eutheria|/$  


The pipe in the middle is like an "or" statement. Do let me know if you have any follow up questions.

Sincerely
Ateeq

--
You received this message because you are subscribed to the Google Groups "google-analytics-spreadsheet-add-on" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-analytics-spread...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-analytics-spreadsheet-add-on/b14086a4-51bb-477b-a894-9d287a746628%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Lisa Lionbridge

unread,
Nov 28, 2018, 6:00:35 AM11/28/18
to ateeq...@gmail.com, google-analytics-...@googlegroups.com
Hi Ateeq,

Thank you so much for responding to me,

I see what you are doing here - however the URL's that I am working with are all very different and have not much in common. 

So that I do not think in my case, that it will work..

Thank you,
Lisa

Ateeq Ahmad

unread,
Nov 28, 2018, 6:58:33 AM11/28/18
to Lisa Lionbridge, google-analytics-...@googlegroups.com
Hello Lisa,
I think regex matching has proven to be quite powerful. If you are comfortable, send me the URL’s and I will build this for you.

Sincerely 
Ateeq

Amruta Nadar

unread,
Jul 15, 2022, 3:08:22 AM7/15/22
to google-analytics-spreadsheet-add-on
Hello,

I need to know what can I add in the filter to fetch the URLs with the "-tutors" in them?

Any help is greatly appreciated!

Thank you,
Amruta
Reply all
Reply to author
Forward
0 new messages