1) Regex for Counting " " and "/"
Regex is awesome. I don't claim to be amazing at it but there are a few common regex strings I use all the time in my analysis.
Length of Keyword
To quickly filter your keywords report by the length of keyword, I use some regex to count the number of spaces in the keyword like this:
^([^ ]+ ){5,50}[^ ]+$
The above regex searches for keywords that have between 5 and 50 spaces in them. You can also search across a single number as shown below. This image is a search for all keywords with 6 spaces in them for the distilled site (i.e. 7 words):
Depth of Page
Very similar to the above regex, but when I'm looking at top landing pages I use regex like this to count the number of slashes in a URL:
^/([^/]+/){3}[^/]*$
Note that because I'm not a full regex ninja this actually counts those URLs that have 4 slashes in (i.e. n+1). So the following image is showing all traffic to those pages with 5 slashes in them:
Note how useful this search is? Pretty much all of these pages are low quality like pagination or blog pages that have multiple categories assigned. For large sites if you construct the regex correctly this can be a great way to analyse where traffic is landing on the site and identify low quality pages to remove from the index.
If you're new to regex - this is my goto guide for using regex in Google Analytics (PDF).
2) Check Your Analytics Code Is Correctly Installed
This is a super easy one, but definitely one worth running on any new site you take a look at. SiteScan will crawl your site and check for the analytics code which is pretty nifty. It even intelligently checks for the old and new versions of the GA code. Nice. Unfortunately the free version only checks 100 pages but it's definitely a solid resource for smaller sites:
Another quick check for correctly installed Google Analytics is to look for referrals from your own domain. Any referral from your own domain indicates that there are pages not correctly tagged (and will even show you which ones!). Nice.
3) 5 Ways to Segment your Funnel
Segmenting your funnel is not something you can do natively in Google Analytics which annoys the hell out of me. I'm hopeful that Google will be adding this feature sometime in the near future. In the meantime, there's a few ways to segment your funnel:
- ROI Revolution have a method for segmenting on the fly - Doesn't do custom date ranges
- LunaMetrics have a way of segmenting the funnel using goals. - Won't let you run across historical data
- Analytics Ninja has a way of segmenting using advanced segments. - Maximum 3 steps at a time
- I give a method using regex and excel here. - takes a bit longer and uses regex and excel
- Paditrack is a tool for doing this - requires some setup and is fairly basic but gives pretty reports
Why do you care about segmenting your funnel? Well I give a detailed run-down of why this is important over here but hopefully this image should explain itself (the output of segmenting the funnel using my method):
4) Track SEO Variables In Google Analytics
This is a nifty use of custom variables which I recently started using on a few sites. Imagine you're running a hotels reviews website. Some of your reviews have 100s of reviews and are lovely content-rich pages. But some of your hotels are awaiting their first review. In that case, your hotel page might be very light on content and might only have the name and address of the hotel on the page (which is duplicated on 100s of other sites). Wouldn't it be nice to be able to segment your Google traffic by how many reviews your hotel page had? Well using page level custom variables this is as easy as the following code:
_gaq.push(['_setCustomVar',
1, // This custom var is set to slot #1. Required.
'Num_Reviews', // The name of the custom variable. Required.
0, // Sets the value of "Num_Reviews" to 0. Required.
3 // Sets the scope to page-level. Optional.
]);
You don't have to limit yourself to just using this for number of reviews, you could look at other factors that you think might be affecting your pages ability to rank and pass those into GA. For example, you could pass the length of the description of a page. Or the number of tweets it has or anything you can think of really!
Learn more about page level custom variables over here.
5) Track Form Abandonment
This one comes from a blog post Duncan wrote a little while back, but I love how simple this is to use and how useful the insight is. Basically, using jquery it becomes very easy to track how far through a form people get. The idea was prompted by Sam's post from some time ago, but uses events instead of virtual page views.
You should read the full write-up on Duncan's post but the code looks something like this:
1. $(document).ready(function() {
2. var currentPage = jQuery.url.attr("path");
3. $(':input').blur(function () {
4. if($(this).val().length > 0){
5. pageTracker._trackEvent("Form: " + currentPage, "input_exit", $(this).attr('name'));
6. }
7. });
8. });
Bonus!
While writing this post, one of Dave Naylor's gang posted about a new interface for in-page analytics which replaces the old site overlay. I'm quite excited about this, I think it paves the way for all kinds of cool things (not least of which is heatmaps as David points out...)
Great post. #1 is a great tip for tracking long tail keywords.
Thanks!
About the first tip to use Regex to filter Two-Word Keywords and so on, You can save it as Advanced Segment to use it later instead of typing the filter every time and so you can also use it to compare it to other Segments in your report.
For EX: You can compare the performance of Two-Word Keywords & Three-Word Keywords bounce rate or conversion rate, etc..
All you have to do is :
1. Go to 'Advanced Segments'.
2. Go to 'Create New Advanced Segment'.
3. Choose 'Keyword' from 'Traffic Sources' as dimension.
4. Choose 'Matches regular expression' as 'Condition'.
5. Type in ^([^ ]+ ){0}[^ ]+$ as 'Value'.
6. name your Segment and 'Create Segment'. All set!
^([^ ]+ ){0}[^ ]+$ for One-Word Keywords
^([^ ]+ ){1}[^ ]+$ for Two-Word Keywords
and so on ....
Yep - great point, forgot to mention that you can throw these in custom segments. Thanks!
I just check new feature replacing site overlay and it seems to be much improved. Heatmaps would be awesome.
Very actionable post. I will definitely try few things.
You surely have great tip on the Form Abandonment. Keep it up, i will be looking forward for more posts like this.
One way to be recognised as an expert is to provide a concise demonstration of expertise. You definitely passed the test as fas as I am concerned. Good post
Great tip on the Form Abandonment! Thanks a lot.
Rocket science :)
I also like setting up a filter in the referring sites to group together all Yahoo Mail refers, all Live Mail refers, etc. It gives you a better picture of how much of your traffic is coming from Yahoo Mail, and it's easier to sort through the other referring sites.
Adding &limit=20000 to the end of the URL when wanting to export more than 500 rows would be on my list - it rocks!
Nice tips
Thanks for sharing
Great to know about Sitescan. Another tool in the SEO arsenal.
Good to know about Form Abandonment. This is MUST for all those wanting to improve conversion.
Thanks
Nice roundup of tips. I do something similar with the number of keywords in query, but never thought to try it with landing pages. cool tip.
Also, didn't see you mention it but there's a Chrome extension for checking your analytics configuration you can find here: https://chrome.google.com/extensions/detail/jnkmfdileelhofjcijamephohjechhna
It's quite nice as it also shows what's being sent back in the console window - great for quick validation.
Usin jquery is probably the most useful feature. Checking form success is majorly important
Nice article, thanks!
Re Form Abandonment you may also like the more advanced solution which enables to calculate the Error % of not filling in specific form fields properly. While it's not really a hack and requires technical skills on server side, I think it may provide you with even more detailed insights of what kind of problems users really have with a form.
More details can be found at the official Google Analytics Blog:
https://analytics.blogspot.com/2010/04/how-to-measure-quality-of-online-form.html
Good timing! I'm studying for my Google Analytics IQ test right now so this is a great post for me to be reading.
Very useful stuff! It always amazes me how smart people like you come up with this stuff. Thanks!
I tried sitescan immediately, for some reason it keeps telling me that GA code is missing on several sites that are properly tracked (and on which I actually see the code). I will have to dig deeper, Im afraid. Still, it looks quite useful!
Thanks for the post, especially about SiteScan. I just found some pages that didn't have any code.
Great stuff. Concise and extremely valuable.
Excellent tip on form abandonment, I have already incorporated into one of my sites
:-)
Great tips Tom! Thanks for sharing!
I didnt know SiteScan, very usefull tool, i'm sure to use it 5 minuts from now.
Anyway, really great post - these are really right-to-the-point tips that i know i can apply right now in my site's strategy, thanks!
Fantastic. The conditional forumla for keyword length is very handy indeed.
Great post Tom! I just finished running sitescan on a site and will definitely use the tips to decrease form abandonment.
Form abandonment is an issue that has haunted me for years. We have so much trouble convincing clients to have 1 or, at most, 2 page order forms. Some are just unwavering in their belief that more pages mean that the customer is further down the chute and therefore less likely to bail. I know I know I know that's 180 degrees from reality, but try explaining that to them.
Thanks for the tracking code. I never considered watching the form so closely as to know which FIELD was the last visited.
Google Analytics is really amazing tool!
Great tips, Tom! Thanks for sharing! ;)
Awesome tips. A solid understanding of regex is one of those things that is often neglected despite it's power and usefulness. I especially like the form tracking tip and I'll definitely use it on some of my sites.
Rock solid stuff Tom. Every single tip is actionable. You are teh best dude!
[edit} Forgot to mention, thanks for the pointer to Dave Naylor's post. That would totally be the bomb if GA developed CrazyEgg properties. Well, at least for us. Crazy Egg might not be too...crazy about it.
Teh? (First sentance in your post.)
Not sure what you mean.
Can you fix your mispellings?
Other than that, your post was useful and amazing.
https://en.wikipedia.org/wiki/Teh sorry about that - I forget not everyone has the same sense of humour as me! I'll change it around :-)