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/
^/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/phonecallDoes anyone have any ideas?
Thanks in advance for all contributions.
-
You have a few choices, none of them include setting a goal like you want. I can't see any way to do it they way you want.
Option 1: Create profile that disallows the phonecall URLs and set the goal in that profile.
Option 2: Create a custom segment that removes the phonecall URLs from your dataset.
-
I'm no GA guru, but how about just using advanced filters? You can use a custom filter to exclude the requested uri pattern.
-
If you could use negative lookahead the below would work for the goal step regular expression:
/(something|somethings)/(?!.phonecall).
-
Thanks for the response Kevin. The issue I am having is that Google Analytics does not allow negative lookahead to be used which would be the easiest approach to ensuring none of the following our matched:
/specifictextstring/anytextstring/anytextstring/anytextstring**phonecall
/specifictextstring/anytextstring/anytextstring**phonecall
/specifictextstring/anytextstring/anytextstring/phonecall
/specifictextstring/anytextstring/phonecallThanks
-
I'm sure you've found this already but I'll post for reference: https://support.google.com/analytics/answer/1034324?hl=en
And you can check out some examples here: http://www.cheatography.com/jay-taylor/cheat-sheets/google-analytics-regular-expressions/
So try ^/specifictextstring/(.*) for your ^/specifictextstring/anytextstring/anytextstring/
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
-
Google Analytics Not Properly Attributing Goals
My GA has been working fine for years and is now suddenly attributing 100% of my goals/conversions to a "referral" source. In this case "crm.zoho.com". (see attached url) Our contact form is a zoho CRM form. When prospect fills it out online, it dumps them to a thank-you page and the conversion is counted. That all works just fine, but it is not attributing the conversion to Organic or PPC or Direct as it was a month or so ago. I'm not sure if this may be the cause, but I was cleaning up GA about a month ago, deleting some filters I didn't think I needed any more. Thank you for your help. 9CRUx
Reporting & Analytics | | sanctuary2420 -
The best way to track internal links in Google Analytics
Hi there, we are a retail business and we have invested in quality editorial content which sits in our Blog at ourwebsite.co.uk/blog/ The Blog links to the main site (an online store) and I want to track the 'value' of the blog by how many clicks the blog content generates back to the main store. At the moment we're using this code on the end of every link in the Blog: ?utm_source=Blog&utm_medium=Widget&utm_campaign=FromBlog Does this affect SEO and is there a better way of doing it? Thanks.
Reporting & Analytics | | Bee1590 -
Google Analytics goals only show unique event triggers
I have some goals in GA which is linked to different event triggers. However I've found out that the goal is only showing the unique event triggers and not the total. I need it to show the total in order to be accurate. Is there any way to switch that option? I can't find any options like that in GA or guides to do so.
Reporting & Analytics | | WebGain0 -
Is Google doing anything about the spam referrer plague in Google Analytics?
My client manages 15+ websites and we have observed the spam referrer issue has gotten steadily worse and worse in the last few months. I took the time to weed out the worst offenders via traffic filters but our referral traffic source garden was quickly full of weeds again a few weeks later. Does anybody know what the Google Analytics development team is doing to combat the spam referrer issue? I find it quite amazing that Google goes through the asinine effort to block out organic keyword data ("not found" & "not provided) but they don't seem to care about blacklisting/filtering spam referrers. RHnE6Wx
Reporting & Analytics | | RosemaryB3 -
Some goal conversion in Google analytics showing under referral
Yesterday I have created Google analytics account for a new website but few goal conversions comes from payment gateway site (paypal.com, epdq.co.uk) and showing under referral. How to fix this issue so I can know the real source of Goal conversion. *Note - utm_nooverride=1 on thank you page applied, payment gateway URL is already placed in Referral Exclusion List. So please don't suggest either of them. Thanks
Reporting & Analytics | | Alick3000 -
Is there a way to find out who the admin of a Google Analytics account is?
We have a client who has been searching high and low to gain access to the GA account that is tied to their website, but previous agencies keep stating they don't have access. Is there a way to find out who the admins are on a GA account with the tracking number so we can reach out to that person and ask them to admin the client?
Reporting & Analytics | | marketingmediamanagement0 -
Determining Exact Reverse Path in Google Analytics
Within Google Analytics does anyone have suggestions for how to determine the exact reverse path for a product purchased? The goal funnel does not provide in a detailed way, especially if a step is taken out of the exact funnel provided. If this information cannot be obtained through Analytics is there another tool we can use to get the exact path?
Reporting & Analytics | | bozzie3110 -
Is Google analytics not working properly anymore?
Hi mozzers, We launched a website 2 months ago and when monitoring Organic data on GA we had an average of 23% bounce rate like a month ago but the last 2 weeks I noticed that bounce rate=0%. This is very weird especially that we haven't modified the existing pages and that multiple keywords show an average site duration of 0 seconds. Any thoughts about this discrepancy? Do you think that there is an issue with the GATC implemented? Thanks
Reporting & Analytics | | Ideas-Money-Art0