Track SEO rankings with Google Analytics

January 05th, 2009 – 202 Comments

2010 SEMMY Runner-UpSome months ago I created a Google Analytics filter that enables you to track your Google rankings. On my own Google Analytics blog I blogged about it and saw there was more interest in it then usual. Joost walked by and offered me to do a guest post on this subject. So here he goes:

Track SEO rankings?

Well, you can’t specifically track the exact position of the keyword that was clicked like you can do with AdWords. But it is possible to determine the page he was on. A ranking tool can tell you over and over again that a certain keyword is around position 15 in Google while Google Analytics claims he is on page 1 (position 1 to 10). This effect can come from ‘personalized search’ or ‘local results’ that can influence the Google rankings dramatically. People see other results than you see with your ranking tools. And therefore you need Google Analytics to do the real ranking.

Setup the filter

To get the rankings in your Google Analytics reports you have to create a new filter:

analytics google ranking

The title of the filter contains a 3, that’s because filter 1 and 2 take care of filtering out everything else than Google Organic traffic. So yes: you also have to create a new profile to apply these filters on to be sure you don’t screw up your main profile.

This filter only works for Google. if you want it to work for Yahoo and Live Search also, make sure you change the filters 1 and 2 so they accept Organic from all three of them. Then setup the filter like this:

analytics ranking

The ranking results

After a while the “User Defined” report will look like this (ignore the language):

rankings example

What you see are not the actual rankings, but the number of the first result of the page the keyword was on. So when you see 20, it means the keyword was on the third page, and a 50 means the sixth page. (Yahoo and Live Search will report 21 and 51 in stead of 20 and 50).

When you don’t see a number but only “(page: ): it means the keyword was on the first page. So perhaps it is better to change “page:” to “minimal position;”, I leave that up to you.

If you want to filter the list of keywords on keywords with at least a page 2 position you can use “(page: d{2,3})” in the filter field below the list. The d stands for digits, and the 2,3 for the amount of digits you’re looking for.


202 Responses to Track SEO rankings with Google Analytics

  1. Steve
    By Steve on 14 November, 2009

    Andre, I have created a new profile to use specifically for the new filter above. But my new
    profile has not received any traffic data in a couple of days while my primary profile updates
    normally. What else do I need to do? I added the filters to the secondary profile. Thanks

  2. Chip
    By Chip on 13 November, 2009

    This might sound elementary, but the filter only tracks clicks on my links, not overall impressions?(Where we rank on search terms that are not clicked on) Is there a way, through GA, that you can track this info?

  3. Alex
    By Alex on 3 November, 2009

    A little late, but I’ve just found this post and want to thank you for the excellent filter tip. I’ve installed in on a few of my clients so can’t wait to see some results!

    If I can ask a question (it might be obvious!), do I need any other filters installed to make this work, or can I use it as a sole filter?


  4. Afzal Khan
    By Afzal Khan on 1 October, 2009

    I guess, I am bit late finding this great post. Never mind!!!…I’ll be setting up it now…..thanks for this awesome tip.

  5. abercrombie
    By abercrombie on 4 September, 2009

    Thanks for sharing informations.Looking forward to more stuff.

  6. michael
    By michael on 4 September, 2009

    great post very informative.

  7. Phil (ppc_guru)
    By Phil (ppc_guru) on 28 August, 2009

    The above can be done in a one filter…

    * Organic keyword (page:no) on,, to User-defined

    UserDefined:$A3 ($A2 page:$A5)

    e.g result would be – keyword (google page:10)

    You can also try…

    * Organic keyword (position:no), to user-defined

    UserDefined:$A3 (position:$A4)

    e.g result would be – keyword (position:3)

    Note: cd=1 is ignored as this can be a Search wiki results, where a users has pushed up a single listing.

    • Levi Page
      By Levi Page on 8 October, 2009

      Hi Phil,

      Is there a way to get the exact ranking position for Bing and Yahoo as well?

  8. Trond
    By Trond on 26 August, 2009

    Great post!
    Exactly what I was looking for! :-)
    I posted a similar article on my blog some time ago that also allows some more filtering. Google Analytics has really become more powerful. I’m looking fro the day when I can track more than 4 goals within the same profile. This would make me possible to use Google Analytics on more of my business sites.

    Thanks again!
    Trond :-)

  9. Thomo
    By Thomo on 17 August, 2009

    Thanks – this will prove to be very beneficial I should think

  10. Billige mobiltelefoner
    By Billige mobiltelefoner on 14 August, 2009

    very nice wordpress block, i gust love the design.

  11. Jerry
    By Jerry on 11 August, 2009

    That’s a great tip!I’m studying to use google analytics.

  12. Shailendra Dubey
    By Shailendra Dubey on 3 August, 2009


    Can you please tell me where this report is shown in Google Analytics

  13. Shailendra Dubey
    By Shailendra Dubey on 3 August, 2009


    I have implemented this filter.
    But i am not able to find the report.
    Can you please tell me where this report is shown in Google Analytics

  14. Phil (ppc_guru)
    By Phil (ppc_guru) on 17 July, 2009

    Here is a neater version of the above…

    * Extract Organic keyword+page number on or or and send to user-defined field by Phil.

    user-defined:$A3 ($A2 page:$A5)

    For the keyword position use…

    * Organic keyword+position in SERP on to user-defined by Phil.

    user-defined:$A1 (position:$A2)

    e.g result would be… keyword (position:3)



    • Deb
      By Deb on 7 October, 2009

      When you write “medium” do you mean “campaign medium”?


    • Travis
      By Travis on 10 September, 2009

      phil – would like to discuss with you… can you get in touch with me?

  15. Natasha
    By Natasha on 7 July, 2009

    Andre, I was wondering if you saw my post?

  16. Pieter | Zoek
    By Pieter | Zoek on 6 July, 2009

    Great tip! Gonna try this later on.

  17. tiffany and co
    By tiffany and co on 8 June, 2009

    Thanks for your useful info, I think it’s a good topic.

  18. Atul
    By Atul on 3 June, 2009

    The analytics filter works fine for me but I am not clear as to what is meant by ( not set ). Also
    below (not set ), there is a entry Guest. Can anyone please explain.

    • Atul
      By Atul on 5 June, 2009

      Some times ago, Amit wrote ” Use Defined value with $A2 (page: $B2/10 + 1) so that it is easy to understand the corresponding page number?”

      I have tried this, but the result is not clear. Its like this –

      Keyphrase ( page:/10+1) Is this the correct result.

  19. Amita
    By Amita on 2 June, 2009

    Really, really great article! Many thanks. It works.

  20. Adam
    By Adam on 27 May, 2009

    Cool tips! Thank you very much!

  21. Abdullah
    By Abdullah on 26 May, 2009

    wow that’s awesome
    thank u very much

  22. Jordan Levy
    By Jordan Levy on 14 May, 2009

    Wow! This filter is awesome, definitely going to save me a lot of time.

  23. Rune Hansen
    By Rune Hansen on 9 May, 2009

    Cool article about this methode – thanx for the tip!

  24. kuda Woo WOO
    By kuda Woo WOO on 27 April, 2009

    great post sir..
    thanks for sharing. really helped a lot here.

  25. EuropeanKiss
    By EuropeanKiss on 26 April, 2009

    Thanks for the translation!


  26. SearchPresence
    By SearchPresence on 22 April, 2009

    This is great, but the majority of clicks coming from search engines come from the first page of users’ SERP. Also, there is a huge difference between being ranked 10 (below the fold) and being ranked 3 (above the fold).
    Check us out here:

  27. Eric
    By Eric on 21 April, 2009

    Wow, SO simple, I can’t believe I never thought of that. This is Awesome! Thank you!

  28. Corey Koberg
    By Corey Koberg on 19 April, 2009

    Andre’s filter was ahead of it’s time!
    But now that Google is rolling out the new results pages with the position built in, we can use a similar filter to embed that directly in the reports.
    See this post for details:


  29. Red Label
    By Red Label on 15 April, 2009

    Thanks for the tip. I implemented something similar months ago and it’s invaluable, but I’ll be setting this up as well today.

  30. Atul
    By Atul on 15 April, 2009

    I have applied the filter but it shows ( not set ). What does it mean and how can I remove this.

  31. Paul
    By Paul on 14 April, 2009

    Thanks for such great information, not just to you, Joost, but everyone else who has contributed and added so much useful content. For a newbie, any help is very much appreciated. Thanks once again.

  32. Linus
    By Linus on 2 April, 2009

    I cant get my filter working, it just stand (page: $b2) in the report after the keyword.
    Could someone give me a hint please.

    thanks for a smart filter!

  33. neville
    By neville on 19 March, 2009

    Cool ;-) Thanks a lot for posting this powerful filter. Finally now I know for what is that filter function in Analytics :D

  34. Atul
    By Atul on 27 January, 2009

    I have implemented the filter which shows full referral name of sites on one of my sites. Bit it is not showing http://

    part. Is there any way to do it.


  35. John
    By John on 21 January, 2009

    This is great! Thanks so much. Any chance that this could be modified so that the keywords are displayed properly? Currently, hyphens are displayed as %22, etc. Anyone else experiencing this, or come up with a solution?

    Thanks again for your work!

  36. Rafael Montilla
    By Rafael Montilla on 21 January, 2009

    Great Tip, I have found good infomation in this blog.

  37. Garry Parkes
    By Garry Parkes on 19 January, 2009


    This blog is great. Wish I’d have found it earlier as I’ve really wanted to get on top of WordPress SEO.

    I’m got a rather troublesome problem that I’ve posted on my Blog to do with SEO. I’ve managed to get a good following on my blog (just outside Alexa ranking of top 100k) and freely give out information about how to build a successful online business through using a Blog. My latest report to my readers has me stumped though !!

    I let everyone know my ‘tips’ and ‘secrets’ for how they can improve things for themselves. However, in my latest I do a comparison between my blog and another that has an Alex Ranking of over 16 million!. On the face of it there should be no comparison and yet the other performs better in terms of positioning for Google searches. My blog has pretty awesome stats and the other one less so for EVERY measure you can think of that is relevant to SEO. In terms of on-site SEO they are broadly similar. And yet my higher traffic blog is far lower down the Google returned search results compared against this other one.

    There is a good debate going on my site as to possibilities why this is the case and yet it still remains a mystery. Anybody throw any light on the matter?

    Garry Parkes

  38. Vlado
    By Vlado on 19 January, 2009

    Really, really great article! Many thanks

  39. Meuble asiatique
    By Meuble asiatique on 19 January, 2009

    Awesome post, thank you very much.

  40. Seth
    By Seth on 18 January, 2009

    In the user defined value report, the number one listing is “(not set)”. This constitutes half of all visits. What does the “(not set)” mean?

    Drilling down, the source is from each of the search engines.


  41. Joost de Valk
    By Joost de Valk on 18 January, 2009

    I’ve created a video to show everyone how to implement this filter:

  42. Atul
    By Atul on 17 January, 2009


    I have created a filter for organic traffic only. The code is –

    New filter ->
    Filter name `Organic`
    Filter Type -> Custom Filter
    Checked : include
    Filter Field: Campaign Medium
    Filter Pattern `organic`

    My query is –

    1. Is it necessary to use single quote between organic like this ‘organic’.

    2. Is this the correct code I have implemented or there is something missing.

  43. Michael
    By Michael on 14 January, 2009

    HI, anyone of you who can give the final settings for Analytics – including the Dropdown and formulas – so that there is ONE posting with the settings which do work regulary – even when they show +10 instead of 12. But everyone is asking for settings which do work. MOSTLY I see (not set) and some of the keywords show a ranking. Thanks, Michael

    • Damon Gudaitis
      By Damon Gudaitis on 14 January, 2009

      Setting up these filters will eliminate the not set results.

      Filter 1
      -Create a Custom > Include filter
      -Filter Field = Campaign Medium
      -Filter Pattern = organic

      Filter 2
      -Create a Custom > Include filter
      -Filter Field = Referral
      -Filter Pattern = (google|yahoo|msn)\.[a-z]+

      Filter 3
      -Create a Custom > Advanced filter
      -Field A->Extract A = Referral | (\?|&)(q|p)=([^&]*)
      -Field B->Extract B = Referral | (\?|&)(start|first|b)=([^&]*)
      -Output To->Constructor = User Defined | $A3 (page: $B3)

      If you’re not sure about something here, have a look at my detailed GA SERPs hack post on my own blog.

  44. delicious
    By delicious on 14 January, 2009

    I probably missed something. Filter doesn’t work.
    Do I have to set up the 2 filters above to make it work or the first one or the other is enough?
    Which report in GA is concerned? Keywords report?
    Many thanks for your help

    • Damon Gudaitis
      By Damon Gudaitis on 14 January, 2009

      First, it takes a day to see the results, so maybe you just need to be patient.
      The first two filters aren’t absolutely necessary, but you really should do them. If you don’t, you will see a lot of unset values in your report and you will someday find query strings that match your regular expressions and give you some weird data.
      To see the actual data, click Visitors > User Defined in the menu on the left of the GA interface.

  45. Damon Gudaitis
    By Damon Gudaitis on 14 January, 2009

    I tried a bunch of different ways to format this hack and got one to work. This hack works with both the original code that tracks Google, and the code I posted earlier in the comments to track Google, MSN, and Yahoo.
    It takes a bit of work, but if you really want to format the search rankings cleanly:
    1. Create a Custom > Search and Replace filter to format unset page 1 results.
    -Search String: \(page: \)
    -Replace String: \(page: 1\)
    2. Create a Custom > Search and Replace filter to format page 2 results.
    -Search String: 1([0-1])\)
    -Replace String: 2\)
    3. Repeat previous step for page 3+ incrementing the first number by one in both the Search String and Replace String each time until you get bored.
    If you’re not sure about any of this, I’ve put up extremely thorough instructions explaining how to set up Google Analytics SERP filters on my own blog.

  46. Richard
    By Richard on 12 January, 2009


    less nice; another * on my “to do list” ;)

  47. Paw Hellegaard
    By Paw Hellegaard on 11 January, 2009

    Great article and funny method to use g – analytics.

  48. Danny
    By Danny on 11 January, 2009

    Hey Joost,

    big thanks for this tip, I have just created this filter, tomorrow I’ll see the results :)

  49. geekTips
    By geekTips on 11 January, 2009

    Whoooaaa!! Dude, this is awesome! Will sure to try it

  50. Jared Huber
    By Jared Huber on 10 January, 2009

    This solution is great. Using it to identify low-hanging fruit on SERP pgs 1 and 2. If you’re already using the user-defined variable for something else, extract the $A2 page $B2 to a custom variable, then use another filter to mash up that custom variable with user defined.

  51. John
    By John on 9 January, 2009

    Thanks for sharing the resource. It makes life more simpler to keep track of many sites. :)

    • Atul
      By Atul on 10 January, 2009


      I have two queries

      1. Under the User defined value ( Visitors > User defined ), it shows ( not set ). what does it mean

      2. One of the keywords is showing like this –

      Keyword+keyword+keyword(page:10) where all these keywords constitute a keyphrase. But when I checked with this keyword, the site was on second page. Please explain.

      • Damon Gudaitis
        By Damon Gudaitis on 10 January, 2009

        1. I’m not sure about this.
        2. I’m planning on doing a posting explaining this thoroughly on my own blog once I’ve tested a few advanced hacks. If you see (page: ) it means you’re on page 1. (page: 10) or (page: 11) is page 2, (page 20) or (page:21) is page 3 and so on.

  52. DanS
    By DanS on 9 January, 2009

    How do you get this to work – i’ve entered the details but where do I see the results?

    I’m lost

  53. Martijn
    By Martijn on 9 January, 2009

    What exactly does the number mean? Does ‘page: 20’ say ‘there are 20 results before your link is displayed? Is that the reason why the link was actually on the 3rd place (20+1 minus 10 per page)

    • Martijn Beijk
      By Martijn Beijk on 9 January, 2009

      20 text link results. because the actual number of items displayed per page is higher due to Universal Search Items. So the number of the page you are on doesn’t tell you explicitly about the position of that link (the incoming tracked click might come from a universal search item, triggered by the same keyword ).

  54. w#g
    By w#g on 9 January, 2009

    Doesn’t work :( I doublechecked the data to fill in but the positions don’t show up in my results. Maybe I made some mistake with filter 1 and 2! Does anybody have the same problem? Or do I just have to wait longer (it’s almost 24 hours ago) My filters 1 and 2 are set as follows:
    Filter 1: custom filter; include; campaign source; “google”
    Filter 2: custom filter; include, campaign medium; “organic”
    Begging for help! Thanks guys!

  55. Martijn
    By Martijn on 9 January, 2009

    For me it works too, I thought to see it in the default report instead of the user defined.

  56. Christopher Regan
    By Christopher Regan on 8 January, 2009

    Oh my G**! Blessings for this.

    By on 8 January, 2009

    Anybody got this working, because I haven’t.

    Here is an exemple of what I get:
    keyword1+keyword2 (page: )

    Nothing shows up after page:

    Here is what I filed in the filter form:
    Field A -> Extract A: (\?|&)q=([^&]*)
    Field B -> Extract B: (\?|&)start=([^&]*)
    Output To -> Constructor: $A2 (page: $B2)

    I have checked and double checked and it seems to be exactly what is on the first screenshot.
    (I have also done filter 1 and 2)

    If someone could help that would be great

    • Mandy
      By Mandy on 8 January, 2009

      This could be a good sign!
      André writes in the post: “When you don’t see a number but only “(page: ): it means the keyword was on the first page.”
      I also was waiting some time to see if the filter really works and it was the first time that I was happy to see a keyword which did NOT appear on the first page. ;-)

  58. Francis
    By Francis on 8 January, 2009

    Awesome post!
    Very helpful.

  59. Synchronium
    By Synchronium on 8 January, 2009

    Great tip. I installed it straight away – just waiting on the data to start pouring in!

  60. Digitsy
    By Digitsy on 8 January, 2009

    That’s a great tip! Thanks a lot!

  61. SEO pro
    By SEO pro on 7 January, 2009

    Great tip, I’ve set it up and I’m awaiting for the results
    Any way – Thanks.

  62. iskandarX
    By iskandarX on 7 January, 2009

    So that was tracking filter talk about. Great and awesome. Thanks.

  63. André Scholten
    By André Scholten on 7 January, 2009

    @Jeroen: correct :)

  64. Jeroen Sijbom
    By Jeroen Sijbom on 7 January, 2009

    Hey Andre,

    Superpost. Heb het direct geprogrammeerd. Ik vraag me alleen af of je ook regex moet gebruiken bij filter 1 en 2 of kan je gewoon ‘google’ en ‘organic’ invullen zonder regex?

    Groeten Jeroen (FBTO)

  65. Erik
    By Erik on 7 January, 2009

    the user defined report is standard available in your analytics account. Go to “visitors” the user defined report is at the bottom of the list.

    • Tony
      By Tony on 7 January, 2009

      Thanks. I new I’d seen it somewhere, but I’m still finding my way around GA.

  66. Tony
    By Tony on 7 January, 2009

    What a really useful post! Now I’ll be able to see far more using Google Analytics.

    The only problem I’m having is the User Defined Report. Do you create this under the Custom Reporting section?

  67. Paul
    By Paul on 7 January, 2009

    What the fuck is that, the last Tweets from my Account SEO_adsense? Sorry!?!?

  68. Mandy
    By Mandy on 7 January, 2009

    Thanks for the explanation, Michael!
    Meanwhile I can see a first result in the User Defined report, but it looks like this:
    : (page: )
    The keyword is missing, I can only see it after clicking on this value and select the dimension “keyword”.
    Double-checked the reg. expressions in the filters and it looks ok – same like you described.
    Any idea?

    • Michael
      By Michael on 7 January, 2009

      Hi Mandy, don’t use the expressions I have posted on 6 January 2009 at 10:36. I have used Damon Gudaitis posting from 6 January 2009 at 01:23 which also did not work in my Analytics and only showed NO KEYWORDS. I used this instead – which works fine now and should work fo all major search engines. Please change to:
      Feld A -> A extrahieren Kampagnenbegriff (.*)
      Feld B -> B extrahieren Verweis (\?|&)(start|b|first)=([^&]*)
      Ausgabe in -> Konstruktor Benutzerdefinierte Segmente $A1 (page: $B3)

      • Damon Gudaitis
        By Damon Gudaitis on 7 January, 2009

        You’re right about my RegEx not working. I just threw it together without much thought which is why I warned everyone.
        But I think your Field A only works with paid traffic. I presume Kampagnenbegriff means one of Campaign Source, Campaign Medium, Campaign Name, Campaign Term, Campaign Content, or Campaign Code (most likely Campaign Term). Please correct me if I’m wrong, but Campaign refers to Adsense and other paid traffic that you attach tracking parameters to the URL.
        The problem with my first RegEx was that I wasn’t extracting the right variables to output to the report.
        Try this:
        Field A->Extract A Referral (\?|&)(q|p)=([^&]*)
        Field B->Extract B Referral (\?|&)(start|first|b)=([0-9]*)
        Output to->Constructor $A3 (page: $B3)
        or alternately try
        Output to->Constructor $A3 (page: $B3)/10+1

      • Mandy
        By Mandy on 7 January, 2009

        Thanks a lot, Michael!! Now the filter is working! Great!! :)
        I wrote a post about it in German with some more details how I finally implemented the filter in Analytics:
        Thanks to all for your help and this great idea!!

  69. Michael
    By Michael on 7 January, 2009

    You can see the SEO Keyword Ranking Tracking under User Defined already today after a few hours if you change the report-date to TODAY! I do already see some of todays search/click queries. Mike

  70. Martijn
    By Martijn on 7 January, 2009

    Michael, thanks for the explanation!

  71. Michael
    By Michael on 7 January, 2009

    @David @Mandy @Atul @All which do not find their Keyword Ranking in the Google Analtyics Report

    ENGLISH: you can find your User Defined Report like Ranking 3 when you click on the tab Visitors and then at the end of the menue on the Link User Defined.

    DEUTSCH: du findest deinen Benutzerdefiniert Report wie Ranking 3 wenn du auf den Tab Besucher klickst und dann am Ende im Menü auf Benutzerdefiniert klickst.

  72. André Scholten
    By André Scholten on 7 January, 2009

    @Luke: you’re certainly not dreaming: create a new filter, filter type “custom” and then choose “advanced”. Set Field A on “User Defined” and “(.*)” and Field B on “Campaign Source” and “(.*)”. Then set “Output to” on “User Defined” with “$A1 ($B1)” and that should do the trick.

    @Mandy: patience, it should take max 24 hours to see the first results in the “user defined” report.

    @David: Search for the “user defined” report

    @Atul: the keywords appear automagically ;)

  73. Volker
    By Volker on 7 January, 2009

    Just remember you probably should to create a duplicate profile of the GA account before applying the filter.

    • Martijn
      By Martijn on 7 January, 2009

      @Volker, what exactly do you mean with duplicate profile. Should I implement 2 GA codes, or are there other ways to “back up” the data?

      • Michael
        By Michael on 7 January, 2009

        @Martijn – Volker means, that you setup a second profile under the same Google-Account. When setting up a new profile you are getting asked if you want to do that for an already existing domain – say YES and choose the domain you want to see the SEO Rankings. You will see, that the tracking code of the second profile is exactly the same as from the first profile with the same domain.

        Why did Volker warn you … when you set a filter this is influencing all of your data. If you do a wrong filter maybe you get no data until you remove the filter again. So you should ALWAYS test a filter in a second test profile. The problem could be, that otherwise you have NO Tracking-Information for that period of time you had the filter set. Inside a report you can not turn on filter and see filtered and then turn off the filter and see all results. Google Analytics generates your statistics based on the set filters of each profile and stores them “static”.

  74. Dennis Pease
    By Dennis Pease on 7 January, 2009

    Awesome tip, I’ve set it up and I’m anxiously awaiting results :) Thanks.

  75. Atul
    By Atul on 7 January, 2009

    I was thinking yesterday about this and today came across this post. Great. I have just set it up but please reply if I need to manually enter the keywords or it will be done automatically.

  76. Featherstone
    By Featherstone on 7 January, 2009

    Great! and very informative. I’m starting up to learn more about GA. Thank you.

  77. David King
    By David King on 7 January, 2009

    Thanks so much…

    I got both of the filters set-up but the problem is that don’t know where to view the results or get the report from them…

    thanks for letting me know about it though!

    David King

  78. Mandy
    By Mandy on 7 January, 2009

    Uuhm sorry, another question: You mentioned
    The title of the filter contains a 3, that’s because filter 1 and 2 take care of filtering out everything else than Google Organic traffic.
    Could you please specify how filter 1 and 2 need to look like? Or where I can find more information about it? Thank!!

  79. Mandy
    By Mandy on 7 January, 2009

    Wow, that’s a great tip! Thanks a lot!
    How long does it take until I can see the filter working? Will it be visible automatically in the Traffic Sources > Keywords report?

  80. Rasmus
    By Rasmus on 6 January, 2009

    Great tip Joost – looking forward to seeing the results

  81. Luke
    By Luke on 6 January, 2009

    Great tip. Should be useful on a number of sites I work on. One question- Is there any way to include the “Source” within the output? It would be really interesting to be able to see an output such as:

    example keyphrase (Google, Page: 30)

    Am I dreaming?

  82. Demerzel
    By Demerzel on 6 January, 2009

    Eh, I prefer this way instead for tracking page positions.

    I prefer keeping my keywords as keywords and then segment instead so I can see across pages if I want to as well.

  83. Ben
    By Ben on 6 January, 2009

    This is great! Thanks for the tips…

  84. Will Scott
    By Will Scott on 6 January, 2009

    @Andre – thank you!

    The additional info makes it super-easy to implement.

  85. eric
    By eric on 6 January, 2009

    @Andre – thank you so much! best, Eric

  86. André Scholten
    By André Scholten on 6 January, 2009

    @All: Thanks.

    @Andrew, @Eric, @Martijn: To set up the first 2 filters to include only (Google) organic traffic you: create a new filter, choose filter type “custom filter”. Then choose the “include” option, set the filter field on “Campaign Medium” and the filter pattern on “organic”. This filter only allows organic traffic in the profile. The second filter that only includes Google traffic is the same but with filter field on “Campaign Source” and filter pattern on “google” or “google|live|yahoo”.

    @Amit: you can’t put calculations in the filter field, would be nice though.

    @Patrick: if you look at the “User defined” report you see a little textbox at the bottom. You can use that to filter the keywords list real-time.

    @Arjun: when I find out how to do that I will definitely blog about it ;)

    • Andrew Lahser
      By Andrew Lahser on 9 January, 2009


      Thanks. It’s working! Great tip.

    • Michael
      By Michael on 7 January, 2009

      Hi Andre, just to be sure … I do NOT have to use Filter 1 and 2 if I want the rankings on all Keywords of all Search Engines. Am I right? Thanks, Michael

    By on 6 January, 2009

    Bedankt, werkt goed!

  88. Erik
    By Erik on 6 January, 2009

    Below you will find a link to some explanation on excluding everything but organic traffic. Andre refers to this as ranking 1 and 2.

  89. Ronnie
    By Ronnie on 6 January, 2009

    Great post, and indeed simple to setup!

  90. Andrew Lahser
    By Andrew Lahser on 6 January, 2009

    Please explain how to throw out “everything but organic search results” for us newbies. Thanks so much.

  91. Arjun
    By Arjun on 6 January, 2009

    Hello Andre Scholten,

    That’s Great. I have to check it out. It would be great if you could add little more innovation to your thoughts and tell me the trick that how to find out exactly the position instead of page if possible. lol :) :) :)


  92. Tom Broekhoven
    By Tom Broekhoven on 6 January, 2009

    Great addition, and simple to set up. The results are nice and a great in addition to the data of other tools.

  93. Martijn
    By Martijn on 6 January, 2009

    Nice method. How can I filter the Google searches (filter 1 & 2) exactly? I am using a dutch version of GA, the formulas should work there too?

  94. krishna
    By krishna on 6 January, 2009

    Great Post !!!. Will certainly try out this on my website. Tweeted this one :)

  95. Richard
    By Richard on 6 January, 2009

    this is cool, i’ve been doing this for the last couple of months. I recommend putting this in place

  96. seo_adsense
    By seo_adsense on 6 January, 2009

    SeitenRanking bei Google bei Google Analytics anzeigen lassen:

  97. Patrick
    By Patrick on 6 January, 2009

    Great tip!

    Already implemented it, but I’m also curious about the last comment you make. It is indeed interesting to only see the second page keywords. Exactly in which field do you put the code “\(page: \d{2,3}\)”?

  98. Michael
    By Michael on 6 January, 2009

    For all German Readers the required fields in Deutscher Sprache:

    Ranking 3

    Feld A -> A extrahieren (\?|&)(q|p)=([^&]*)
    Feld B -> B extrahieren (\?|&)(start|first|b)=([^&]*)
    Ausgabe in -> Konstruktor $A2 (page: $B2)

    • Christophe
      By Christophe on 8 January, 2009

      Excellent GA trick André!

      Michael, here you have to change the values you want GA to collect in the constructor field.
      Since these two regex also take into account MSN and Yahoo, a new set of parenthesis was added, so the constructor field has to be changed accordingly :

      Field A -> Extract A (\?|&)(q|p)=([^&]*)
      Field B -> Extract B (\?|&)(start|first|b)=([^&]*)
      Output To -> Constructor $A3 (page: $B3)

      • Michael
        By Michael on 9 January, 2009

        @Christophe – I have now used your code. I have also heard that Field A -> Extract A Campaign Term should be changed to Referral as otherwise only campaign keywords will be reported. Can you give a full and final description of ALL SETTINGS?

    • Michael
      By Michael on 7 January, 2009

      Don’t use the expressions I have posted on 6 January 2009 at 10:36 (above). I have used Damon Gudaitis posting from 6 January 2009 at 01:23 (ahead) which also did not work in my Analytics and only showed NO KEYWORDS. I used this instead – which works fine now and should work fo all major search engines. Please change to:
      Feld A -> A extrahieren Kampagnenbegriff (.*)
      Feld B -> B extrahieren Verweis (\?|&)(start|b|first)=([^&]*)
      Ausgabe in -> Konstruktor Benutzerdefinierte Segmente $A1 (page: $B3)
      The setup-process in german ist posted here:

  99. Will Critchlow
    By Will Critchlow on 6 January, 2009

    I love that method to have the page show up in the keyword data. I wrote about a similar method of filtering by referring page before Christmas (tracking referrals from second page of Google). I’m going to update my post with a link to this. Great work.

  100. Leif Jason
    By Leif Jason on 6 January, 2009

    Very handy André! I’m going to set this up with a couple of test clients right away.

  101. Damon Gudaitis
    By Damon Gudaitis on 6 January, 2009

    I was just going to try and figure out if I could do that with a regular expression except starting on page zero, but your way is much better.

  102. Amit Agarwal
    By Amit Agarwal on 6 January, 2009

    Thanks so much for this awesome hack. Is it not possible to replace the Use Defined value with $A2 (page: $B2/10 + 1) so that it is easy to understand the corresponding page number?

    • Robert Kingston
      By Robert Kingston on 7 January, 2009

      I’d like to know the answer as well…

    • feir
      By feir on 7 January, 2009

      I really want to know the answer. Thanks.

  103. Ben Tortora
    By Ben Tortora on 6 January, 2009

    This absolutely a genius way of doing this.

    The most creative and innovative post I have read in a long time relating to analytics.

  104. feir
    By feir on 6 January, 2009

    Nice post. Thanks a lot for this.

  105. eric
    By eric on 6 January, 2009

    this is great; I understand it but I don’t know how to do filters 1+2 (to filter out all but organic traffic). could you give an example of what those rules would look like? many thanks. best, Eric

  106. adam
    By adam on 6 January, 2009

    Cool, thanks a lot!

  107. Nicole Simon
    By Nicole Simon on 6 January, 2009

    Regexp and google analytics … what can I say, I am in love. ;)

  108. Will Scott
    By Will Scott on 6 January, 2009

    OK, that is super cool! This totally solves the problem of correlating GA data to 3rd party ranking software.

    Thanks so much for publishing this. I know of at least one company for whom this data is their business model.


  109. AussieWebmaster
    By AussieWebmaster on 6 January, 2009

    You have a great post here mate… this is a must read for everyone – will be writing about it for Search Engine Watch

  110. Phil Buckley
    By Phil Buckley on 6 January, 2009

    Fantastic tip! I too am setting it up right now, thanks.

  111. Damon Gudaitis
    By Damon Gudaitis on 6 January, 2009

    I quickly modified the regular expressions to work with Yahoo and MSN too. I just started testing it so use at own risk.

    Field A (Google and MSN use q for query parameter, Yahoo uses p):

    Field B (Google=start, Yahoo=b, MSN=first):

  112. Oliver Bodnar
    By Oliver Bodnar on 6 January, 2009

    This is awesome information, except you didn’t tell people where to go to create a new filter…you can find it here:

    • Jessica
      By Jessica on 4 October, 2009

      Thanks for the link, Oliver. That helped a lot and supplemented the article.

  113. Fabrizio
    By Fabrizio on 6 January, 2009

    Woooah! Great tip for a dummies like me. I’ll try it tonight. Thx a lot and good 2009 to all

  114. Terry Richards
    By Terry Richards on 6 January, 2009

    Whoaaa, this is a great post. I will set this up tonight and let you know how it goes. This should work for what I need it for!

  115. Vincent Sparreboom
    By Vincent Sparreboom on 5 January, 2009

    Wauw what a great tip!! Extremely valuable. I’m setting it up right now, thanks a lot!

    • Natasha
      By Natasha on 3 July, 2009

      @ Andre

      Thank you for posting this filter! I implemented it to our company’s analytics report 2 days ago (on July 1st) and have a few questions. We seem to be getting a lot of (not set)’s. Since Wednesday, we’ve gotten 99 in total. Is this normal? Also, the results we are getting show a lot of #1 placements, which seems a little unrealistic. I entered the code exactly and was wondering why this might be happening? Please advise.

      Thank you!

      • Serg
        By Serg on 7 December, 2009

        Great info. Thank you

Check out our must read articles about Analytics