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
-
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 -
Google Analytics Question - Impressions & Queries Up, Sessions Down
I'm working with a client who, according to the Google Query report, impressions and sessions are up since we've started work with them about 6 months ago, but Google sessions are down. In moz, we're seeing a gradual, but steady increase in search visibility specifically with Google. Note: this is all organic. From when we started tracking queries, the first month we were tracking there were 43,581 impressions and 690 click throughs for the month. This past month there were 98,293 queries and 1015 clicks throughs for the month (granted not year over year data) - of these 1,015 clicks, 995 of them were from web. However, for those same time periods, sessions from Google are down over 30% - 1,750 vs. 1,189. I'm not sure how to interpret this. I realize that clicks and sessions are not a straightforward comparison, but I would think that if clicks were up according to the query report that sessions would also be up. Is it that some of these clicks are bouncing and therefore not being tracked as a session? Is there a potential issue with how data is being tracked?
Reporting & Analytics | | Corporate_Communications0 -
Possible penalty question - need expert help
hallo everyone, I am posting this question to the MOZ community, because I could not find any useful information or proper advice so far, even after consulting a few local SEO experts. I noticed from the end of september a steady and consistent decrease in visits (please see attached pdf) for my website https://bastabollette.it I lost so far almost 40%. Please consider that I have not changed my habits in blog posting lately, both in quantity and quality. I have not made any subtantial change on the website lately. I did a general audit of the site asking to an expert but apart from some generic suggestions (like: "work on increasing PR, add more quality backliks, use more no-follow links, fix broken links" - things I am currently going to fix anyway) I don't really understand the reason of the drop. Please also note the strange drop of 11/22/15 (see search console screenshot). Can you please help me? thank you. Selezione_018.jpg Selezione_019.jpg
Reporting & Analytics | | micvitale0 -
Question about setting up Google Webmaster on Network Solutions?
I'm trying to set myself up as a Webmaster on my company's site. We use Network Solutions. I am following Google's directions on how to do this. However, I am a bit wary. Here are the directions. Underlined is the part I am having trouble with: Log in to your account for howlatthemoon.com at www.networksolutions.com by clicking theManage Account icon. In the left navigation bar, open the nsWebAddress (Domains) menu by clicking the **+ **icon. Click Manage Domain Names. On the Domain Details page for the domain you're using, select the Designated DNS radio button (to the right of Change domain to point to) and click the Apply Changes button. If you've previously modified your advanced DNS settings, click Edit (to the right ofDomain currently points to). Under the Advanced DNS Manager heading, click Manage Advanced DNS Records. Under the Text (TXT Records) heading, click Add/Edit. In the Host field, enter @. Leave the TTL field set to the default value. In the Text field, copy and paste the following unique security token:
Reporting & Analytics | | howlusa
(security token removed for obvious reasons) Click Continue. Review your changes and click Save Changes. When you've done saving the TXT record, click the Verify button below on this page. There is already a host of @ (None). The text for it reads: v=spf1 include:_spf.google.com ~all I called Network Solutions and the guy I was speaking with told me to delete it and replace it with my Google Webmasters code. However, I think this is setting up our email. Do I just add the Webmasters in and have two hosts of @ (None)? Thanks!0 -
'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 -
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 -
An initial set up question - linking to GA
when viewing campaign it indicates there is a problem linking to our GA account but the details entered are correct. Any ideas what the problem might be - nothing on the campaign settings page gives me a clue. There is a highlighted box saying disconnect from GA but nothing else. The only thing i can think of is that the GA account was set up by a third party and we have access to view it - could it be a permissions problem?
Reporting & Analytics | | GreatGifts4Kids0 -
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