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

Regex for segment - start of a url string

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi,

 

I'm a bit stumped on this one. I've tried to create a segment that looks for organic traffic based on a section of my site from external traffic, however it's the part of the URL string that doesn't seem to be working for me.

 

I want to pull sections of the site that start with /Discover/ for example. When using \/Discover/.* then it will pull in URLs where Discover is further down the string eg /Schools/Discover/. I have tried to use begins with but that doesn't seem to work. Have seen others suggest using \A but have tried that without any luck.

 

Can anyone suggest some regex that will only pull in urls that start with /Discover/ based on the example of www.qub.ac.uk/Discover/

 

thanks

Regex for segment - start of a url string

Participant ✭ ☆ ☆
# 2
Participant ✭ ☆ ☆

Hi @Elaine F,

 

If you use "starts with" '/Discover', it should work fine. If it doesn not work, it might be related to your segment definition. Which dimensions did you use in your segment?

 

Regards

Regex for segment - start of a url string

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Hi,

 

I'll give that a go and see how it works. Thanks for the reply.