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
-
How to set and understand behavior flow in google analytic?
Hello Experts, How to set and understand behavior flow in google analytic? I have attached screenshot of my behavior flow it is showing not set. So how to set? Thanks! MAQnG SQ7QM
Reporting & Analytics | | micey1230 -
Google Analytics: Different stats for date range vs single month?
I've been scratching my head, chin, and you name it over this one. I have an advanced segment to remove bot traffic from my data. When I look at the Audience Overview data for a single month (let's say Aug). I am shown a session count. No problems here, however If I set the date range to (January - August). The august monthly stats is incorrect, much lower. What this means is that, if I export a CSV report from Jan-Aug, the data is wrong compared to individually recording a month. Anyone faced this? I've asked the question over at the Google Analytics technical section as well, but no answer P.S I even used the 'control the number of sessions used to calculate this report' tool but no luck.
Reporting & Analytics | | Bio-RadAbs0 -
Using Filters On Google Analytics
Hi Guys, I am In need of some technical help with regards to Google analytics. One of my clients has a site providing HR Software on SaaS basis. The users login via the site for the various HR Tools. Obviously this is skewing the analytics data and showing 10,000+ extra visitors that actually don't exist. Now I understand i can add filters and exclude certain pages for instance the login page, however, some users will visit the home page then click login. How can I exclude them just to show new visitors to the site rather than users that are just trying to login. Hope this makes sense Neil
Reporting & Analytics | | nezona0 -
Google Analytics traffic hijacking?
Ran into something interesting a week ago - the same Google Analytics code was installed on two different sites by accident. The account was reporting traffic from both domains. Haven't found a definitive answer on how to stop this yet if it were to be used maliciously?
Reporting & Analytics | | khemistry0 -
What is s.ytimg.com in google analytics?
My clients GA reports 273 visits from s.ytimg.com. I go to the site, it doesn't exist. I googled it, there were some code with s.ytimg.com in it, but nothing I could understand. Anybody have an idea where this comes from?
Reporting & Analytics | | endlessrange0 -
Why is Webmaster Tools not Linking Correctly Google Analytics?
I have a global site with .com as the US site and then /country for all other markets i.e. .com/uk .com/de etc. Each site has it's own WMT profile. Each site has it's own GA profile. Since Google added Search Engine Optimization to the GA interface, I can't track these sites separately under this new feature. It seems to me that it can only be associated with a single WMT profile at a time or rather that WMT can only be associated with a single GA profile at a time. The numbers for the UK and US site are identical, but when I try and link the UK WMT account with GA it removes it from the US profile and vice versa.
Reporting & Analytics | | Red_Mud_Rookie0 -
How to change a url for google analytics account
We recently changed the url of a client's website. Is there a way to change the url on the ga account instead of creating a new account so that we don't lose comparative data? Thanks! Sorry- I know this is a novice question.
Reporting & Analytics | | marketing12340 -
Conflicting Analytics: Getclicky vs. Google Analytics
Removal of an old getclicky code (and installation of new tracking code) from my site after some changes resolved inaccuracies in my page view/bounce rate information. Prior to adding the correct getclicky code, getclicky was showing 95% plus bounce rate on my site. I knew this was wrong because GA showed around 40%. Ironically, now that my getclicky account is working (showing a 30% bounce rate), GA bounce rate is steadily climbing. Is it best to just stick with one analytics account so that the codes don't conflict? Is it possible to have two accurate analytics accounts at the same time?
Reporting & Analytics | | JSOC0