Tracking Referrals from Second Page of Google in Google Analytics
I have been experimenting with some advanced features in Google Analytics over the last couple of days. I was inspired by some very clever insights from Search Laboratory (sphinn it here) that we have found very useful.
I wanted to be able to use Google Analytics to find referrals from the second (and greater) pages of Google search results (details at the end on how to do this for Yahoo! and Live). We find this data hugely useful during SEO projects because if you are ever getting decent traffic from page 2 (or any traffic from pages 3+) that indicates a huge opportunity for increased traffic. Sometimes this can be done just with on-page changes, sometimes it needs some more links, but it’s almost always worth it. Up till now, we have had to gather this data with additional third-party tools or log file analysis, but since the vast majority of our clients use GA, it is worth the effort to work out how to do it.
So enough fluff. How do you do it?
Start by creating a new profile for the site:

Note that Google Analytics profiles do not dynamically apply to previously-collected data, unlike segments which make an appearance later in this technique, so you need to do this in advance of needing the data.
Once you have a new profile, edit it and add a filter:

Set that filter up exactly as this image shows:

The text in the Field A –> Extract A box is (\?|&)(start)=([^&]*)
This is a regular expression which extracts the parameter called ’start’ from the referring URL. Google uses this to determine which page of results to display (page 2 is start=10, page 3 is start=20 etc. for anyone with the default settings of 10 search results / page). If you want to set this up for Yahoo!, they use a parameter called ‘b’ and b=11 is page 2, b=21 is page 3 etc. Live uses the same numbering scheme with a parameter called ‘first’. So replace ’start’ with ‘b’ for Yahoo! and ‘first’ for Live (and remember that you need a different segmentation below).
Once you have your filter defined, that includes the output into the User-Defined field (that is what $A3 means in the Output To text box). When you go into your reports, you can now see data broken down by this. That isn’t quite what we want though – we want to see referring keywords that come from specific pages of search results. To do this, we need the new feature in GA called ’segments’:
![]()
Click on the drop-down and add a new segment:

Set it up as shown above (user-defined value is under the ‘Visitors’ dimension). If you want 2nd page referrals from Google, you want matches exactly = 10 (I find it useful to have a segment for that and another for pages 3-5). If you are setting up a segment for Yahoo! or Live, and set the filter up appropriately for them above, then you will need 11 / 21 / 31 etc.
Once you have this segment, you can apply it to any report you like:

Apply it to your organic keywords report, and you’re good to go!
On another subject entirely…
For those of you not just interested in learning about Google Analytics, I published a post earlier today called SEO agency for sale? (just before disappearing off for 3 weeks’ holiday). If that headline isn’t enticing….
Late update
Joast’s site has just published this post which gives a nice addition to the method that includes the referring page in the keyword data.
If you have enjoyed this post you can subscribe to the rss feed to read more about how you can monitor and protect your brand online


Comment link
paisley on Fri (12 Dec) @ 4:21 pm
very cool experiment but couldn’t you just upgrade to a better stats programme like, http://www.hitslink.com? they show absolute referrers
Comment link
pavlicko on Fri (12 Dec) @ 8:30 pm
Will, that’s awesome. I’d never considered doing that, but I certainly do see the value – thanks for sharing the tip. bookmarked.
Comment link
Dorian on Fri (12 Dec) @ 8:35 pm
Thanks for posting this. I’ve been looking for a way to see this referral information in Google Analytics.
You would think Google would have this information setup by default. It’s kind of pain to setup all these filters/profiles for all my websites. And even after I do it, I still miss out on some referrals (like if someone has their results set to display 100 at a time, etc).
I would prefer to use another Analytics program, but now that Google links Adsense data with Analytics, it’s a must-use for Adsense sites.
I wish Google would look at the user interface of Get Clicky analytics. They could learn something.
Comment link
Christian - Wpromote on Fri (12 Dec) @ 8:55 pm
Will, great write-up and work around with Google Analytics. We’ve begun testing out Enquisite Analytics which offers something similar, but it’s good to know that it is possible to do this with Google Analytics.
Comment link
Corey on Mon (15 Dec) @ 1:10 am
Interesting stuff and awesome article. I’ll sphinn it.
Analytics is awesome and any additional features we can utilize it for will make us that much stronger in days to come.
Good stuff.
Comment link
Bartek Berlinski on Mon (15 Dec) @ 9:48 am
You’ve written:
“The text in the Field A –> Extract A box is (?|&)(start)=([^7]*)”
But on the screen there is no “7″ but “&”. But that’s a detail – Thanks very much for this filter!
Comment link
Peter Young on Mon (15 Dec) @ 10:17 pm
Great Post Will – not something many people would have thought of doing but very useful
Comment link
Alice on Fri (19 Dec) @ 4:38 am
The filter doesn’t seem to be working. Is it because there is an &sa=N on the end of the google search url now? I’ve can’t seem to think of what could be wrong. Any ideas?
http://www.google.com/search?hl=en&rls=com.microsoft:en-US:IE-SearchBox&rlz=1I7ADBF&q=Tracking+Referrals+from+Second+Page+of+Google+in+Google+Analytics&start=20&sa=N
Comment link
Will Critchlow on Sun (4 Jan) @ 8:45 am
Good spot Bartek. Fixed!
Alice – there are loads of parameters that can be in the string (sa=N is common). That shouldn’t stop it working – can you check that you have everything set up as per the screenshots (pay attention to Bartek’s comment above as there was a small error in the original post). Let me know if it’s still not working. Sorry it’s taken me a while to reply – I was away on honeymoon!
Comment link
Kate Morris on Wed (7 Jan) @ 4:27 pm
That’s three posts today about using advanced reports in Google Analytics. Guess I need to go play in that today huh?
Thanks Will
Comment link
robbothan on Wed (7 Jan) @ 4:58 pm
hi Will – great stuff – was looking at this before xmas but it was Joost’s and Scholtens blog post that spurred me into action on this!
Is there a custom filter for the first page SERPs?
As obv got 2nd page(10), 3rd page(20) etc – but first page is a 0
Presume it would be “user defined value, matches exactly – 0″
Comment link
Will Critchlow on Thu (8 Jan) @ 9:29 am
Hi Rob,
Unfortunately not – you can’t do that as the “start” parameter is often not there when you just do a search – it only appears when you go to page 2, 3 etc.
You want:
user defined value
does not match regular expression
[0-9]*
The [0-9]* regular expression means “any number” so what you are saying here is that you match the segment where your user defined value is not a number (normally means it’s not present). I’ve just tested that and it works fine for me.
Comment link
Der SEOdiotische Wochenrückblick - KW2 | Der SEOdiot on Fri (9 Jan) @ 5:26 pm
[...] mit Google Analytics die Besucher von der zweiten Ergebnis-Seite herausfinden Wow. Ein genialer Eintrag, der mal wieder die Power zeigt, die eigentlich in Analytics [...]
Comment link
Online Media Limited on Wed (14 Jan) @ 11:03 am
Will
What I would be interested to know is what impact would SearchWiki results have on tracking whether the referring traffic came from the second page etc?
Ie. if a user has upvoted a particular result to page 1 – if they click on that link in the future, based on your experiment here, what that referrer be classed as a page one? Even though the true page it was referred from was page 2, 3 etc?
Just a thought…
Paul
Comment link
John on Wed (21 Jan) @ 5:22 pm
Will,
Thanks a lot for putting this guide together, great stuff. I got it working, and created segments for 2nd, 3rd, and 4th page. I’m a little confused though – When I apply this segment to keywords, why do some keywords (usually longtail) show up, but have zero visits? If there were zero visits from that keyword, why would it show up in Analytics in the first place? This only happens with “paid”, obviously meaning Adwords. Any idea?
Comment link
Will Critchlow on Sat (24 Jan) @ 6:03 pm
Hi John,
Glad it’s helping. I have been confused by these “zero” visits too. I’m afraid I don’t know the answer – but I have dropped Avinash Kaushik a line – if anyone knows the answer, he will!
Hopefully he’ll stop by and shed some light on it for us.
Thanks
Comment link
Avinash Kaushik on Mon (26 Jan) @ 2:38 am
John: Here is one scenario where you might see Zero Visits…
If you come to my website on the keyword “iPod” and then you go back to Google and come back my website on the keyword “iPhone” in less than 29 minutes then in terms of giving “keyword credit” for that visit (remember it is the same session), iPod will show Zero visits and iPhone will show one visit.
As you can imagine the application is doing a balancing act between not making decisions for you (dumping the first keyword) and showing you something that might be of value. Tough act. : )
-Avinash.
PS: There is another scenario where you might see zero visits. If your adwords account is linked to GA and you use the paid search keywords reports in GA then some of the cost reports you can see a keyword with 0 visits too – that is because you could have had impressions for a keyword with no visit and since in Analytics the cost information is imported these keywords can still show up in GA reports.
Comment link
Will Critchlow on Mon (26 Jan) @ 6:58 am
Thanks Avinash. That makes perfect sense – great explanation.
Comment link
Will Critchlow on Fri (30 Jan) @ 10:01 am
Paul – sorry for replying out of sequence – just seen your question. This tracks the actual page that someone clicked on – which means if they have customised their results and see you on page 1, then page 1 will show in your analytics. There is no way to know where you “should” have ranked. This impact of personalisation of search is one of the big reasons rank checking is a declining benefit…
Comment link
Grand Rapids Web Designs on Fri (30 Jan) @ 6:25 pm
Will, Great post! I’ve enjoyed having this on my Analytics and it’s opened my eyes to some interesting stuff going on at my site.
Thanks!
Comment link
John on Fri (30 Jan) @ 11:54 pm
Will,
Oddly enough, I saw the post on SEOmoz earlier today regarding this exact issue? Any chance I was the inspiration for your post? Haha, anyway, thanks a lot Avinash and Will, it’s very much appreciated, and that makes perfect sense to me now.
Comment link
Will Critchlow on Sat (31 Jan) @ 8:32 am
Yes – you were (I linked to you in the ‘moz post, I think!).
Comment link
Rob Hadingham on Tue (3 Mar) @ 4:43 pm
Avinash,
On keywords showing 0 visits in GA … I buy your 29 minute explanation (good one!). But I don’t understand your PS – are you saying that unclicked Adwords impressions are recorded in GA sometimes? If it happened all the time GA would be a mess! Have I understood you corrrectly?
Could repeated clicks on the same ad (same keyword) within 29 minutes cause it? I think so.
Cheers! (Thanks also to Will)
Comment link
How to track 2nd page rankings in Google Analytics | Leo Fogarty .com on Thu (20 Aug) @ 10:42 pm
[...] to Will and the guys at Distilled, I’m going to show you how to set this tracking up in Google [...]
Comment link
Ben Griffiths on Fri (5 Feb) @ 9:48 pm
So, could I then alter the regular expression from (?|&)(start)=([^&]) to (?|&)(start|b|first)=([^&]) to encompass all three search engines, then just use different segments for each?
In this case, each segment would require both the source (search engine) and the user defined value (unique to each search engine), correct?
Comment link
shoaib hussain on Fri (12 Feb) @ 7:00 pm
thnx a lot this is really worth reading and the point that Avinash is damn good for someone like me.
Comment link
Chris Redshaw on Fri (19 Feb) @ 1:56 am
Another incredibly awesome post from Distilled.
Thanks Will! By the way, also really enjoyed your presentation regarding link building in Seattle, very helpful.
Cheers,
Comment link
SMX Advanced London 2010: Extensive Recap & Takeaways (2/3) | Search Engine People | Toronto on Thu (3 Jun) @ 1:16 pm
[...] Takeaway: Andy makes a really good point of looking at your analytics data to see which keywords are already bringing you traffic from the 2nd or 3rd page of SERPs, and then try and position those keywords nearer to the top of the 1st page, which brings me to this excellent post on the Distilled blog on exactly how to do that. [...]