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.2K members online now
3.2K members online now
Ask questions about filter set-up and issues with using filters in Google Analytics reports
 
Guide Me
star_border
Reply

Filtering URL string to create view. Very similar text

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Been working on a regex problem in Analytics for a couple days can't seem to find a solution. I'm looking to distinguish between very similar text in a URL. Need to create views.

Here's the text I'm filtering:

can
cana
canad
cand

If I use an include filte for "can" I wind up getting the "cana", "cand" and "canad" URLs

Unfortunately this url is displayed two differnet ways. Once in the middle of the URL and once at the end.

test.com/p?mem=10&id=can
test.com/p?id=can&mem=10

 

So I'm wondering if I should use include filter that catches both
"can&"
"can" end of line

 

Or is it better to create an include for
"can"

and exclude
"cana"
"canad"
"cand"

 

Any help would be appreciated.

1 Expert replyverified_user

Filtering URL string to create view. Very similar text

Top Contributor
# 2
Top Contributor

Hi :-)

You will need to test this however the following should work as an include to catch both can and can&
can((&.*)?)


 

Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here

Filtering URL string to create view. Very similar text

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Thanks for the help. Appreciate it.