Regular Expression Question
-
We are having a little trouble coming up with a goal that shows how many product pageviews we are getting but I need to exclude search results pageviews that (unfortunately) have the same URL structure. Because it's an outside CMS, we have not ability to change the URL architecture.
Products are on these types of pages:
- https://porscheasheville.com/inventory/Porsche+Boxster+Asheville+North+Carolina+2016+Rhodium+Silver+Metallic+536911
- https://porscheasheville.com/inventory/Audi+A4+2.0T+Premium+Plus+Asheville+North+Carolina+2015+Gray+638379
Search results pages have this URL structure:
- https://porscheasheville.com/inventory/new/
- https://porscheasheville.com/inventory/?condition=new&make=Porsche&model=Boxster
- https://porscheasheville.com/inventory/used/
- https://porscheasheville.com/inventory/?condition=used&model=A4+2.0T+Premium+Plus
I am hoping to create a GA goal with regular expressions showing only the product pages and not allowing the search results pages show up.
Here's what I have, it's not working - any regex experts out there who can help? /inventory/[new/][used/]
Thanks as always MOZ friends!
-
This worked out perfectly, thank you so much for the help!
Cheers!
-
Hey ReunionMarketing,
Using the examples you provided, the following Regex should work for you.
/inventory/[^(new|used|?condition)]
Effectively this is saying:
Look for /inventory/ where the next character grouping isn't new, used, or ?condition.
I tested this on all of your examples and it should work perfectly for you.note: this will include /inventory/ as a goal, so make sure that's not an issue for you.
I recommend using regex101.com for any further regex that you need to build as I think it's a great tool.
Let me know if you run into any further issues on this and I'll help you out!
Regards,
Trenton
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
UTM tracking on a mapped subdomain, is it OK? (DA bonus question)
Hi, This is a technical question. OK, two technical questions. Please bear with me and I'll do my best to explain... We have a WordPress blog (business account, hosted by WordPress). We use it to blog and send traffic to our separate e-commerce site. We use UTM tracking to see which blog posts perform best. Our e-commerce site has a high domain authority. Our blog, not so much. In an effort to increase the domain authority of the blog we have mapped a subdomain of the e-commerce site to the Wordpress blog (still hosted by WordPress). Q1. Will this actually raise the blog's DA? If the blog does get a DA boost, I guess it'll be because Google now sees it as part of a powerful domain. But if it is technically part of the powerful domain... Q2. Should we remove the UTM parameters from the blog? I've read that you should never use UTM on internal links because it messes with your Google Analytics data. But I'm unsure if links on a mapped subdomain count as 'internal links'. Any help would be gratefully appreciated. Thanks in advance. J
Reporting & Analytics | | JabeKay0 -
Bounce Rate Question - The percent calculated does not add up
Hello All, I'm attempting to see why organic search bounce rate has increased by 5% when compared to last year for a certain section of my website. I am using a custom segment to filter the specific pages I want to look at. Once the custom segment is set, I go to Acquisition - > Channels - > Organic. Then, I click the Landing Pages tab. Because we don't have keyword data anymore the only thing I can look at is the landing pages that contributed to the change in bounce. Finally, I set my date range and compare to the same date range as last year. Once I set the date range I am presented with a list of URLs and the percent change in bounce rate for each URL. This is where I get confused. If you look at the average bounce rate at the top of the column (example 1 attached) it does not add up with the data below it. If you export all of the data to excel, and then do an "Average" function in Excel, the data adds up to 17.29% instead of 35.04% for Sept. 2013. Why does this not add up? Isn't GA calculating the Average? Also, I always notice several URLs with only 1 session per URL. Several of these 1 session URLs have a 100% bounce rate. Since the bounce rate at the top of the column (example1) is a reflection of the average bounce rate, wouldn't these 1 session URLs significantly distort my data? I ultimately just want to see the pages that are contributing to the increased bounce rate when compared to last year. Having a hard time figuring this one out. Thank you all, Dave zMfAGls
Reporting & Analytics | | DaveGuyMan0 -
Ok. I'm just going to cut loose with my stupid question. What is internal link equity? What distinguishes an internal link with equity from one without equity?
What distinguishes an internal link with equity from one without equity? Is there a limit to how many of these I want? What's the rule-of-thumb? Cheers, Wes
Reporting & Analytics | | wrconard0 -
Question about cannonical URLs for a site redesign
Hello folks, I've redesigned a site completely and I ended up changing their CMS to wordpress as well. So their URLs which mostly ended in .html and folder organization have been thrown completely out the window with wordpress' '/' format. I'm just wondering what the best way is to approach retaining all the site's previous "link juice". What should I be doing here? How do I make sure their organic rankings don't fall? (They've left their previous SEO firm so they can't help me out on this). Thanks!
Reporting & Analytics | | seonubblet0 -
Wordpress SEO vs Regular Site SEO
Hey Mozzers I'm building a Wordpress-powered site (self hosted on different domain). I know there are different plug-ins and whatnot for Wordpress SEO, but what exactly am I getting myself into? Am I required to use these plug-ins even if I already know how to do regular SEO on-page coding, or are they mainly dumbed-down tools for mom-bloggers to use? Am I still able to use Google Analytics as I am with a regular site?
Reporting & Analytics | | Travis-W
What else is there to think about? Thanks!0 -
Our SEO is garbage. can someone answer a few questions for me?
I've seen our SEO drop to more or less the bottom of the barrel, and I don't have any answers yet as to why. SEOMoz is running it's crawl currently, and I have a few errors about duplicate titles and content, so I know I have some work cut out for me. But, why the sudden drop? The only change I made at the time was a change to our URL structure, but all links were 301'd to their new location. Does this still hurt SEO that terribly? Also, our robots.txt file is getting indexed and showing up as the first result at times. Very embarrassing. It's doing better than our other pages. 😞 I don't get what's happening here. Yrzu3,fkbYu
Reporting & Analytics | | stagl0 -
Google Analytics - Referral Traffic Question
How Google Analytics determine that some particular web site referred traffic if there is no back link on that site?
Reporting & Analytics | | DiamondJewelryEmpire1 -
Whats the best way to separate Google Shopping from regular organic traffic in analytics?
whats the best way to separate Google Shopping from regular organic traffic in analytics?
Reporting & Analytics | | DavidKonigsberg0