Analytics
2.4K members online now
Understand information in your reports and troubleshoot reporting issues such as self-referrals, (not set) data, and inaccurate information
 
Guide Me
star_border
Reply

Using Regular Expressions for 'Less Than' or 'Greater Than'

Follower ✭ ☆ ☆
# 1
Follower ✭ ☆ ☆

Greetings All,

 

I am trying to mock up some dashboards directly in Google Analytics web-based reporting interface and I was hoping to use filters when creating a custom report.

Normally, I would just pull the data I want to manipulate into Google Sheets or some other data visualization tool, but I am trying to build a dashboard in the web-based solution a demo.

 

Thanks for your help,

Kevin

Re: Using Regular Expressions for 'Less Than' or 'Greater Than'

Explorer ✭ ✭ ☆
# 2
Explorer ✭ ✭ ☆
Could you tell us please what is the connection between the title of your post with the need you expressed in the post? I'm not really sure what you'd like to accomplish.

Re: Using Regular Expressions for 'Less Than' or 'Greater Than'

Follower ✭ ☆ ☆
# 3
Follower ✭ ☆ ☆
Ah, yes.

This screenshot should be more illustrative.

http://goo.gl/95VmRZ

Re: Using Regular Expressions for 'Less Than' or 'Greater Than'

Explorer ✭ ✭ ☆
# 4
Explorer ✭ ✭ ☆
Try: .[3-9]

Re: Using Regular Expressions for 'Less Than' or 'Greater Than'

Follower ✭ ☆ ☆
# 5
Follower ✭ ☆ ☆
Thanks, though, hypothetically, wouldn't that exclude sessions with a page depth greater than 9?

Re: Using Regular Expressions for 'Less Than' or 'Greater Than'

Follower ✭ ✭ ✭
# 6
Follower ✭ ✭ ✭
Hi Kevin,

as far as I know, there isn't a general symbol to create a "greater than" or "less than" condition via regex.

To use regex for this purpose, you should basically build a regex that matches with all the numbers that satisfy the condition you want.

Here are one link with an explanation of how to use regex for matching numeric ranges and two links in which people asked a similar question concerning regex and greater than / less than conditions:

http://www.regular-expressions.info/numericranges.html

http://stackoverflow.com/questions/29339393/regular-expression-to-check-number-greater-than-100
http://stackoverflow.com/questions/8592488/regex-how-can-i-match-all-numbers-greater-than-49

Honestly, I don't know if the solution your are looking for is easily viable: in fact, if you want to create a dynamic dashboard that changes the data shown based on the user's input (like: show me data of sessions with page depth greater than 3; now show me the same, but for page depth greater than 4), I think you you should change everytime the regex, for every query.

(I'm curious to know if other people have some additional or different advices on this topic!)

Hope it helps!

Best,
Gabriele

Re: Using Regular Expressions for 'Less Than' or 'Greater Than'

Explorer ✭ ✭ ☆
# 7
Explorer ✭ ✭ ☆
Instead of using a custom report, you could try using regular reports and use a custom segment. Add Segment, New Segment, Conditions, Page Depth >= 3. You could then use the custom segment for both Audience and/or Acquisition.

Re: Using Regular Expressions for 'Less Than' or 'Greater Than'

Follower ✭ ☆ ☆
# 8
Follower ✭ ☆ ☆
Yeah, I thought of that and that solution would work for a general user. The use case I want to address in the demo is you have an executive that just wants a dashboard snapshot emailed to him on Monday morning covering the previous week. Each widget in the dashboard requires a different set of segments applied based on the thing it's measuring.

I am starting to think that the only solution would be to give the executive a dashboard in Google Sheets (or Excel if you have a data-grabber addon) and then create a recurring reminder on the executive's calendar to review the dashboard on Monday morning.

Re: Using Regular Expressions for 'Less Than' or 'Greater Than'

Explorer ✭ ✭ ☆
# 9
Explorer ✭ ✭ ☆
I would suggest that you try Google Data Studio, it will let you create 5 dynamic reports for free. But it will still require you to use a regex filter for Page Depth like @Olgierd N originally suggested. You could always increase the range to [3-999]
https://datastudio.google.com/u/0/#/navigation/reporting