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
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
-
GA 4 Question
What differences are you typically seeing in Google Analytics 4 compared to UA? For one site I have, UA says there were 2,342 new users. GA4 says there were 1,899 new users for the same time period. Does that seem like a normal amount of difference between the two platforms?
Reporting & Analytics | | emilycarimus1 -
Track conversion from paypal express/Apple pay
Hi All, Is there any way to track apple pay conversion or paypal express conversion in Google Analytics? Thanks
Reporting & Analytics | | Alick3000 -
Hello, our domain authority dropped significantly overnight from 37 to 29\. We have been building good links from high DA pages and producing quality, regular content.
Hello, our domain authority dropped significantly overnight from 37 to 29. We have been building good links from high DA sites and producing regular, good quality content. Anyone able to offer any ideas why? Thanks
Reporting & Analytics | | ProMOZ1231 -
Hi - I have a beginner question about organic search results dropping to zero
Really confused about a site I'm getting going on SEO with... I'm new to SEO, but I've found that the organic search results for princessdesign.co.uk have dropped to zero dramatically. I'm concerned that I've missed something and hope that somebody out there might be able to help? Any input greatly appreciated 🙂
Reporting & Analytics | | Gokart0 -
Regular Expressions in Google Analytics
Hi All I've been struggling to create a regular expression for a Google Analytics goal step that would match the following: ^/specifictextstring/anytextstring/anytextstring/
Reporting & Analytics | | Cabbagefeet
^/specifictextstring/anytextstring/ However I don't want it to match any URLs that end with: /anytextstring**_**phonecall or /phonecall, for example: /specifictextstring/anytextstring/anytextstring/anytextstring**phonecall
/specifictextstring/anytextstring/anytextstring**phonecall
/specifictextstring/anytextstring/anytextstring/phonecall
/specifictextstring/anytextstring/phonecall Does anyone have any ideas? Thanks in advance for all contributions.0 -
404 errors more than 1.8 lacs, Duplicate Content, Duplicate title, missing meta description increasing as site is based on regular ticket selling (CRM), kindly help
Sites error increasing i.e. 404 errors more than 1.8 lacs, Duplicate Content, Duplicate title, missing meta description increasing day by day as site is based on regular ticket selling (CRM), We have checked with webmasters for 404's, but it is not easy to delete 1.8 lac entries. How to resolve this issue for future. kindly help and suggest the solution.
Reporting & Analytics | | 1akal0 -
'Search Queries Report' in Webmaster Tools Question
Hi, How much do you use the search queries report in webmaster tools to research current rankings/movements? It does look like a great tool but the data doesn't seem to be spot on. For example a keyword over a week might have flux in position so lets say 6.0 then 9.2 for 3 days then back to 6.0. But I check the serp's for this keyword everyday and didn't see any movement?!?! Is this a good tool for you?
Reporting & Analytics | | activitysuper0 -
Site: Query Question
Hi All, Question around the site: query you can execute on Google for example. Now I know it has lots of inaccuracies, but I like to keep a high level sight of it over time. I was using it to also try and get a high level view of how many product pages were indexed vs. the total number of pages. What is interesting is when I do a site: query for say www.newark.com I get ~748,000 results returned. When I do a query for www.newark.com "/dp/" I get ~845,000 results returned. Either I am doing something stupid or these numbers are completely backwards? Any thoughts? Thanks, Ben
Reporting & Analytics | | BenRush0