: Create a Segment of users who only visited one part of my website in Google Analytics The website in question has different parts and functionality. E.g. one part is a blog, another a shop
The website in question has different parts and functionality. E.g. one part is a blog, another a shop and then there are meta-pages.
The site is structured as follows:
example.com/blog // Blog main page
example.com/blog/post-name // Blog posts
example.com/shop // Shop main page
example.com/shop/product-name // Products
example.com/legal // Meta page
example.com/about // Meta page
I want to create a segment in Google Analytics of sessions which did not leave the blog. Or in other words: once the user loads a page which does not start with /blog, the session is excluded from the segment.
Therefor I created the following condition for my Blog only segment under *Admin > Segments > Blog only > Conditions.
I read this as "Exclude all sessions from this segment which have a page that starts with anything other than /blog.
However, all sessions are ending up in this segment. What is going wrong here?
More posts by @Yeniel560
1 Comments
Sorted by latest first Latest Oldest Best
Analytics segmentation conditions offer much more operators, than regex. If there's no specific reason behind choosing regex, you could simply go for the following condition, which matches your described requirement.
Filter >> Sessions >> Exclude
Page >> does not start with >> /blog
In case you prefer to or have to use regex, please find detailed description of regex in Analytics here. Also, I'd suggest to try the following expression, based on this sample:
^((?!/blog).)*$
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.