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 Search Console - > Google Search Analytic gives figure for google organic or adwords or combine of both?
Hi All, In Google Search Console -> In Search Analytics. I can see Clicks, Impressions, CTR and Position. I want to know all these 4 - Clicks, Impressions, CTR and Position gives information related to google organic only? or combine or google organic and google adwords? Thanks!
Reporting & Analytics | | wright3350 -
Would updating Meta Titles affect Google analytics tracking?
Hi All, I need a little bit of help. We need to optimize our blog's articles Meta titles for SEO which all exceed 100 characters. I was told that if we change the titles, google analytics would split the tracking pages and count the data as 2 pages (old title and new title). Has any of you have this experience before and if so, is there a way to avoid google analytics counting this as two pages? Thanks in advance! Viviana http://analyteguru.com/ http://analyteguru.com/ http://analyteguru.com/
Reporting & Analytics | | mchoi0 -
Google Analytics Landing Page Report Discrepancy
I have noticed that when I run a landing page report and use the advanced option so I can view only the landing pages that include a particular string in the URL, have noticed that I in the report, the graph at the top will say one thing, but the data below says something else. For example, the graph for one particular search shows 200 Impressions, but the info below says 700 impressions and 610 clicks. Anyone seen anything similar or have any ideas why? Thanks! Craig
Reporting & Analytics | | TheCraig0 -
Universal Analytics: Why does Google Organic appear as Direct traffic?
Hi there, When I enter the site via Google Search and follow myself via Real-Time Analytics I appear an organic visitor (which is good). When I browse and visit the site I still am an organic visitor. However, as soon as I fill in the contact form (gravity forms) and land on the "thank you page" I appear as a direct visitor with Google as the source. Since I have the thank you page set-up as a goal, Analytics incorrectly attributes these conversions to the direct medium instead of the organic medium. The tracking code has been installed on all the pages and all conversions are being recorded. What is going on?
Reporting & Analytics | | Robbern0 -
How do I set a filter in Google Analytics?
I want to filter out direct traffic from the service provider msn. For some reason they are crawling our traffic and its throwing off my data. So I want to exclude direct, but only from msn. Would I set my first filter for direct then msn or vice versa? Thanks
Reporting & Analytics | | EcommerceSite0 -
Goal tracking in Google Analytics
Hi folks I read from various sources that if you setup goals in Google Analytics each of these goals can only be fulfilled once per visit. Also some sources suggesting that only one goal from each goal group can be fulfilled per visit. On our site we have a goal for external links since this provides value to partners. Some users do open an external link in a new tab, then come back to the main site. Any further goal completions would then not get tracked. Since we apply a result based payment model for our work this means we are literally loosing money. Anyone has official info from Google on this? Can it be configured? How long is a visit? Thanks a million and have a great day. Fredrik
Reporting & Analytics | | Resultify0 -
Setting up Google Analytics for Subsites
I currently have one main .com site and am planning on launching geo-location subsites .co.uk, .com.au, .ru, etc... Traffic will flow between both sites and some of the content on the subsites will be duplicate and therefore include a canonical tag to the main site. I want to set up GA to capture who is going to the subsites and vice versa and correctly capture crossover traffic. Any advice on implementing advanced analytics directly (or links to sources that will direct me the right direction for this project)
Reporting & Analytics | | theLotter0 -
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