Track SEO rankings and Sitelinks with Google Analytics II

September 02nd, 2009 – 108 Comments

Earlier this year I did a guest post on this site to show you how to track your SEO rankings with Google Analytics. It was quite some news for a lot of people, just take a look at the 300+ comments. And now it’s time for the follow-up.

Google’s new technology

Since a while Google is testing a new AJAX version of their search engine. I’m not sure who’s seeing the AJAX version and who isn’t, but in Holland most of the Firefox users do see it. You can see if you’re one the new one by looking at the url of a result page:


The great thing about this new version is that it makes Google Analytics capable of tracking the clicked position. Yes you heard what I say: the position. Where the ‘old’ Google only allowed us to track the page a keyword was on, the new Google allows us to track the exact position.

The new filters

You can use the first 2 filters mentioned in the old article, be before you do that: create a new profile where you can apply these filters to (tip: watch the video where Joost explains this all):

Filter name: "Ranking 1"
Filter type: "Custom filter - Include"
Filter field: "Campaign Medium"
Filter pattern: "organic"
Filter name: "Ranking 2"
Filter type: "Custom filter - Include"
Filter field: "Campaign Source"
Filter pattern: "google"

And this is the new filter that is capable of tracking positions:


And the copy/paste version:

Filter name: "Ranking 3"
Filter type: "Custom filter - Advanced"
Field A -> Extract A: "Campaign term", "(.*)"
Field B -> Extract B: "Referral", "(?|&)cd=([^&]*)"
Output To -> User Defined: "$A1 (position: $B2)"

The new reports

If you have implemented everything correct you should see this in the “Visitors -> User Defined” report:


A list of keywords with the position the keyword was on when a visitor clicked it. Now you’re able to see the exact positions, more precise than any ranking tool that is out there. There’s 1 minor drawback: business listings next to the little maps are counted as a position also:


The blue result is counted as the 11th result, and not as the first organic result. But when you’re analyzing your positions you can easily separate the geo-related keywords from the rest.


Very interesting: the sitelinks positions are also tracked, and in a more intelligent way than the maps results. If you click on a sitelink, the actual position of that sitelink is passed on. For example, this sitelink has position 4:


If you want to get better insights about your sitelinks you should create an extra profile with the first 3 filters mentioned above. Then add this extra filter to only track those keywords where people clicked on the (full or oneline) sitelinks:

Filter name: "Ranking 5"
Filter type: "Custom filter - Include"
Filter field: "Referral"
Filter pattern: "oi=(oneline_sitelinks|smap)"

The positions you will see are pure sitelinks positions, and you will get an idea about which sitelink is popular and which isn’t.

Extra tip

While we are dissecting the referring url from the Google Search engine we could take a look at the “meta” parameter (my dutch blogpost about this). It’s used when people use one of these options:


The selected country or language is in the “meta” parameter (not applicable for and can be made visible with the following filter:

Filter name: "Language / Country"
Filter type: "Custom filter - Advanced"
Field A -> Extract A: "Referral", "(?|&)meta=([^&]*)"
Output To -> User Defined: "$A2"

And remember: do this on a new profile so you don’t mess up existing profiles. The selected language(s) or country is visible in the “Visitors -> User Defined” report.

I had this filter for quite a while on a lot of Dutch sites and saw that the three options where used like this:

  1. The internet: 96,69%
  2. Pages in Dutch: 3,28%
  3. Pages from Holland: 0,03%

Well, that was the update, hope you liked it.

108 Responses to Track SEO rankings and Sitelinks with Google Analytics II

  1. Sikat ang Pinoy
    By Sikat ang Pinoy on 8 December, 2009

    I was very pleased to find this site.I wanted to thank you for this great read!! I definitely enjoying every little bit of it and I have you bookmarked to check out new stuff you post. I also have difficulty and problems with google analytics.

  2. Ed
    By Ed on 7 December, 2009

    Having a good knowledge of reg-ex does help a lot for sure.

  3. Search Engine Optimization Cape Town
    By Search Engine Optimization Cape Town on 6 December, 2009

    Hey, thanks for the info…think I have to brush up on reg-ex now

  4. Ed
    By Ed on 27 November, 2009

    Am waiting for Andre to respond also.

  5. Alex George
    By Alex George on 27 November, 2009

    I have the same opinion Manpreet. Tried with this filter, but never worked. Will Andre see our comments and reply us.

  6. Ed
    By Ed on 26 November, 2009

    I get to the same point too Manpreet. Am still trying to figure it out.

  7. Manpreet Kaur
    By Manpreet Kaur on 26 November, 2009

    Hi Andre,

    Thanks for the post. But most of the time I am not getting any results. It shows only ‘not set’. When I saw the comments here, I can see so many people facing the same problem. But there is not reply from you. A maximum of three or four keywords shows the result.

    Please tell us a solution.


  8. saarah
    By saarah on 18 November, 2009

    Wow! This is very interesting and useful too. thanks Yoast !!

  9. Ed
    By Ed on 16 November, 2009

    Thanks for all the help. Still cannot see the reports.

  10. Ed
    By Ed on 16 November, 2009

    How can you track your organic ranking on Google? Hard to say what page you will be coming up on.

  11. Brian M. Connole
    By Brian M. Connole on 16 November, 2009

    That is awesome! I had no idea you could track your SEO rankings with Google. I need to start paying a little more attention. Thank you for the information. This is the first time I have been to your site. I will definitely come back for more of your great tips. Thanks.

  12. Chip
    By Chip on 13 November, 2009

    Hey Andre-
    Thanks for the great info! I’m a newbie, so bear with me; the positions I see are only when someone clicks on my links, correct? Is there a way to find out organic ranking when your links are not clicked? And, my results do not include Adwords clicks, correct? Thanks again.

  13. Ed
    By Ed on 12 November, 2009

    Where do you get the Google Analytics2 code from? I did not see it on my account.

  14. Jeff
    By Jeff on 15 October, 2009


    This looks great, but it’s just not working correctly. I’m getting kw (page: ) or kw (position: ) but nothing else. Any ideas. I’ve read the previous posts and they did not resolve my issues.

  15. subbu
    By subbu on 15 October, 2009


    Great, great content! You are true representation of value on the net.

    Thanks for giving us more ideas about how to spread our word.

  16. subbu
    By subbu on 15 October, 2009

    Great tips and I love how some of the commenters add even more tips. I never thought of the

    site valuation sites. Thank you!

  17. Vishal Verma
    By Vishal Verma on 29 September, 2009

    Hi Andre,

    I have implemented as mentioned above and User Defined report shows the ranking now. For example, 1188 visits from Google organic, but it only shows ranking for 7 keywords and the rest goes to (not set).

    What might be the reason. Any help is appreciated.

    Thanks in Advance

    • Ziki
      By Ziki on 29 September, 2009

      I got the same problem here. Any clarification?

      Thanks a lot

      • Mark
        By Mark on 5 October, 2009

        Great post but I do have the same problem (not set)…

        Any help? Thanks al lot

        • jb
          By jb on 14 October, 2009

          How do i get the whole list of kw? As 90% of them is now in (not set)?

          please help?



  18. Saarah
    By Saarah on 25 September, 2009

    Thanks for this gr8 post . I am having the same problem..

  19. cb
    By cb on 24 September, 2009

    Have learnt about the the “cd” (Organic Position) from Ad:Tech yesterday and decides to search for it online. Great explanation and guidelines. Thanks.


  20. Win
    By Win on 24 September, 2009


    I have implemented as mentioned above and User Defined report shows the ranking now. For example, 33 visits from Google organic, but it only shows ranking for 3 keywords and the rest goes to (not set).

    What might be the reason. Any help is appreciated.


  21. Paddy Moogan
    By Paddy Moogan on 17 September, 2009

    Thanks for the great post! I’m also having the same problem as Sarah above in that I only see (not set) when I select user defined value. Any idea what could be causing this?



    • André Scholten
      By André Scholten on 17 September, 2009

      @Sarah and Paddy: did you check everything twice, are all things in the filters exactly the same and did you apply them to the appropriate profile?

      If you don’t succeed you can send me an email and give my email address admin access. Then I can fix the filters so they work.

      • Sarah DeAtley
        By Sarah DeAtley on 18 September, 2009

        Ok I don’t know what happened, maybe I changed something that helped? But its working now, so that’s good!

      • Paddy Moogan
        By Paddy Moogan on 17 September, 2009

        Hi Andre,

        Thanks for the reply. I’ve just noticed that one of the screenshots above doesn’t match the copy and paste text – Output To -> User Defined: “$A1 (position: $B2)” says $A2 in the screenshot. Not sure if this makes a difference or not?

        I also noticed a place where I had left out a symbol in the expression so maybe that was the problem. I’ll wait for the next update of Analytics and see if it makes a difference.



        • André Scholten
          By André Scholten on 17 September, 2009

          The screenshot is was not right ;)

          • Paddy Moogan
            By Paddy Moogan on 23 September, 2009

            Hi again Andre,

            Thanks for taking a look at the filters for us, they are working better now and I’ve set them up on some other websites too. However the vast majority of stats are still coming through as (not set). Is this normal as not all users will have the new Google query string yet?



          • Andrew
            By Andrew on 22 September, 2009

            Strange. Adjusted all filters, but still getting ‘not set’ message – along with keyword (position: )

  22. Sarah DeAtley
    By Sarah DeAtley on 16 September, 2009

    Thanks for posting this! Mine only shows “not set” as the user defined value, I don’t see any keywords or positions. I’ve checked several times and my filters match yours; any idea why this would happen?

  23. Edward
    By Edward on 10 September, 2009

    Thanks for the great information. It certainly is very useful. I am using Google Analytics at present. How do I update it to GA2?
    Thank you.

  24. Mark | SEO Malta
    By Mark | SEO Malta on 10 September, 2009

    It’s a cool tweak that am sure can be very useful. The data Google gives us in Webmaster Tools is averaged out and is not always very reliable either. I understand that implementing these changes, we can see exact position when one of our urls have been clicked, but still can’t monitor changes on other urls that are not clicked at all.

  25. Bill (Turbo Snake)
    By Bill (Turbo Snake) on 10 September, 2009

    I came here because I couldn’t get my SEO Analytics tracker to work. Probably I’m a bit thick. This looks like a cool tool. Not sure I have the brain power to impliment it. I’d druther just have a plugin that makes everything work.

  26. Søgemaskineoptimering
    By Søgemaskineoptimering on 9 September, 2009

    Nice and great research yoast…you rock … thanks!!

  27. SEM Services
    By SEM Services on 7 September, 2009

    Do you think that this new tracking will enable us to finally get some concrete figures on average click through rates for each position on a SERP? If different companies can collude within an industry, I think some very useful and priceless data could be gathered…

    • André Scholten
      By André Scholten on 7 September, 2009

      It could certainly help, but there are already some methods to do this.

      If you have a sufficient AdWords budget (that means: your ad is visible at all times for a specific keyword): than you know the amount of impressions. And if your site is on the number 1 organic position, you know the amount of clicks.

  28. Business Phone Numbers
    By Business Phone Numbers on 7 September, 2009

    I’ve got to tell you, when I implemented google anal ytics my sites fell off the first page down to page 37 and farther. A lot of people have complained about this. My suggestion is to go with a free java tool that gives you all the info you can possinly need. I’m using statcounter and I love it. I tried many applications before settling on this one, and You will save a ton of time if you use it. I have to affiliate connection with them

  29. EchoBlogger
    By EchoBlogger on 6 September, 2009

    Did a great research on SEO…you rock …!!

  30. Alex Hager
    By Alex Hager on 6 September, 2009

    That´s an amazing post! Thanks for this.

    @Rishi: You can´t generate sitelinks on your own. Google decides if you are important enough to generate sitelinks for you website.

  31. Rishi
    By Rishi on 6 September, 2009

    Hey good article
    can anybody tell me how to generate sitelinks?

    • anna
      By anna on 18 September, 2009

      Hi Rishi,
      as far as I know, google picks sitelinks, so you cannot influence what to feature as a sitelink, but you can show google – via webmaster – what not to show.


  32. Create a Website
    By Create a Website on 5 September, 2009

    Great content. Thanks for sharing.

  33. Dan Nedelko
    By Dan Nedelko on 4 September, 2009

    Werll written. I’m going get this setup on my sites immediately. As always thanks!

  34. Phil (ppc_guru)
    By Phil (ppc_guru) on 4 September, 2009

    Also, try this for Google SERP keyword & position…

    UserDefined:$A4 (position: $A3)

    Five reason why this is better than the above:

    1. “*” has been change to “+” (i.e match 0 characters length or more ..change to.. only match 1 character or more)

    TO cd=([^&]+)

    This will match “cd=2&” but will NOT match “cd=&”

    2. use [?&] rather than (\?|&) to make the RegEx simpler & remove the unnecessary the construct “()”. Note: there is no need to escape \? within a range []

    3. would not match, thus adding “#” to the delimiting parameter fixes e.g. [?#&]

    4. & should be ignored. This can be done by either including or excluding part of the url:

    OR exclude:!custom|m/)

    5. postion can vary on vs, specifying the domain extension means that only country SERP positions are shown e.g www\.google\.(nl)

    OR Referral:^https?://www\.google\.(co\.uk)



    (optional) Google suggest referal url sometimes contain “cd=”, so try adding this line to ignore suggestions them: (?!&oi=spell|&oi=revisions_inline)

    (optional2) User who push thier listing to No1 position using Google SearchWiki can distort SERP positions. Their is nothing in the referal url that differentiates a SearchWiki click, but a negative lookahead for any listing with No1 position can be used cd=(?!1&) e.g.

    UserDefined:$A5 (position: $A4)

    • Frank
      By Frank on 12 November, 2009

      Hi Phil,

      Can you please clarify that using:

      (Campaign???) medium:^organic$
      UserDefined:$A4 (position: $A3)

      …means that I no longer need to setup filter 1 & 2 (ie, your 1 filter does all 3)?

      Also, in the first line ^https?://….
      ^httpS, is that correct? What if the referrer is both http and https, would your filter works?


  35. Sil Kogelman
    By Sil Kogelman on 4 September, 2009

    hope you liked it? I love it! This is great stuff André! Thanks a lot!
    And thanks to you too Yoast, the how-to video about adding rankings filters to a secondary website profile in Google Analytics is really helpful.

  36. Edie
    By Edie on 4 September, 2009

    I cannot see it :( (Czech Republic).

  37. India
    By India on 4 September, 2009

    Thats for the information. Will definitely try it. :-)

  38. Jay
    By Jay on 4 September, 2009

    Interesting read, thanks!

  39. Amish
    By Amish on 4 September, 2009

    Hey YOAST,

    Thanks for the great help on using Filters in GA. Its really useful, but you know sometime I wonder when I have 10-12 filters applied to my site & when I check the USer defined value, it gives me a lot of data :(

    But, this is great :)



  40. Nic
    By Nic on 4 September, 2009

    I have implemented everything correctly as far as I’m aware, but my stats only show position1, position 2 etc, without keywords as shown in your image. I can still see the keywords once I click into the positions and use the dimension drop-down – what have I done wrong?

    • Dirk
      By Dirk on 10 September, 2009

      Still not working…

    • André Scholten
      By André Scholten on 7 September, 2009

      @All: change or drop the “Ranking 4” filter, it wasn’t working properly. I changed the post already.

      • chulian
        By chulian on 7 September, 2009

        Ranking 4 was not included but still the problem exits. searchterm gets not displayed together with the position. any further ideas?

        • anna
          By anna on 18 September, 2009

          The copy paste version is still not good, rejected by the google admin due to a missing backward slash:
          Field B -> Extract B: “Referral”, “(?|&)cd=([^&]*)”
          should be
          Field B -> Extract B: “Referral”, “(\?|&)cd=([^&]*)”

          (I guess)


          • André Scholten
            By André Scholten on 18 September, 2009

            WordPress is stripping the backward slash out of my post, Yoast should have a look at that.

        • André Scholten
          By André Scholten on 7 September, 2009

          Are you sure you are looking in the “user defined” report?

          • Nic
            By Nic on 14 September, 2009

            Thanks Martin, it’s working fine now!

          • chulian
            By chulian on 11 September, 2009

            now its working :). this is one of the coolest analytics hacks ;) big big thanks to andre!!! and and martin for solving the last problem.

          • André Scholten
            By André Scholten on 10 September, 2009

            Thanks, big mistake, fixed it in the copy/paste version.

          • Martin
            By Martin on 10 September, 2009

            There is an error in the description in the article. Ranking 3 needs to look like this:

            Filter name: “Ranking 3”
            Filter type: “Custom filter – Advanced”
            Field A -> Extract A: “Campaign term”, “(.*)”
            Field B -> Extract B: “Referral”, “(\?|&)cd=([^&]*)”
            Output To -> User Defined: “$A1 (position: $B2)”

          • Nic
            By Nic on 8 September, 2009

            Same here, still not working (it’s been running for a day without the 4th filter on)

          • chulian
            By chulian on 7 September, 2009

            thx for the fast reply :) sure i am looking in: visitors –> user defined

            the data e.g. look like:
            2. (position: 1) 618 4,18 00:02:05 84,14 % 65,21 %

    • Dirk
      By Dirk on 7 September, 2009

      I have the same problem…

    • chulian
      By chulian on 6 September, 2009

      i have the same problem. i have exactly set up the filters like mentioned but only positions are shown on the first level. in the dimension of each position i can show the keywords for each position then. but i would love to have the report like it should be. any ideas what could be the reason.

    • Sil Kogelman
      By Sil Kogelman on 4 September, 2009

      Hi Nic,
      Have you selected yes at the radio button ‘Field B Required’ in the Ranking 3 filter?
      This value is standard on no.
      I forgot to do it and had the same problem.

      • Nic
        By Nic on 5 September, 2009

        Hi Sil,
        Yes I did that, but still got the same results!

  41. Jason Berkes
    By Jason Berkes on 4 September, 2009

    Great Post! Wow. never know a lot of this information…..


    Jason Berkes

  42. Adelaide DJ
    By Adelaide DJ on 4 September, 2009

    very cool, thanks for sharing! twitter(at)locspoc

  43. SEO Doctor
    By SEO Doctor on 3 September, 2009

    A top quality follow up Andre, there are not many SEO blogs that you go to any more where you can actually learn something new. Great share.

  44. Jacob Stoops
    By Jacob Stoops on 3 September, 2009

    Wow! Really interesting stuff. Saves the time of using rank checking software and puts all of your valuable SEO info in one place. Kind of an SEO smorgasbord.

  45. Ermal
    By Ermal on 3 September, 2009

    Super useful information, i will implement this for my site… thank you!

  46. Nigel Lamb
    By Nigel Lamb on 3 September, 2009

    Fascinating stuff. I have a client who would be interested in this, I’ll pass it on to them. Thanks very much for sharing.

  47. Rasmus
    By Rasmus on 3 September, 2009

    Great follow up on the post earlier this year. The ajax feature is not yet implemented here – however it will sure come soon. Looking forward to seeing the results in GA.

  48. Nischal Shetty
    By Nischal Shetty on 3 September, 2009

    You probably have never clicked on the post links in your email newsletter or may be it’s just me but the email newsletter contains an error in the post link that appears after the redirect.

    Ex. This post link redirects to :


    • Joost de Valk
      By Joost de Valk on 3 September, 2009

      I know, we’re working on it, thanks though!!

  49. Martin Joosse
    By Martin Joosse on 3 September, 2009

    Just wondering what’s the value of those numbers, if you don’t track clicks on video’s/images etc.. ?

    Besides that, each universal result is counted as an position. So on a query onSteve Jobs you can have >20 results on a single page. So, if Google Analytics shows you are on position 18, it is possible to be on the first page, while you would think you would be on the second page.

    oh and btw, maybe I miss something here, but it was possible to track the ‘exact’ position back in January

  50. tomsmith1984
    By tomsmith1984 on 3 September, 2009

    Amazing. Can’t wait to have a play with these filters.

  51. LJ
    By LJ on 3 September, 2009

    Wow! This is amazing. I need to employ someone crazy like you who can do all this stuff for me because there is absolutely no way I have the time or the patience to sort through all that myself! Great article, and nice to know it can be done!

  52. Bjorn van der Neut
    By Bjorn van der Neut on 3 September, 2009

    The Sitelinks i am verry curious about.
    We wait and see…


  53. Leonard Williams
    By Leonard Williams on 3 September, 2009

    Really good article! Thanks for your contribution to the new web.

  54. Adaam
    By Adaam on 3 September, 2009

    Andre and Yoast: Excellent post! I’m going to implement this right now.

  55. Ian Miller
    By Ian Miller on 2 September, 2009

    Thanks Andre & Yoast, this is great info. I was looking for a way to track the radio buttons for “sites from the…” to see if usage increased with the issues we’re seeing of poor SERPS. Then low and behold it’s here :)

    Many thanks

  56. Cormac Moylan
    By Cormac Moylan on 2 September, 2009

    Is it possible to combine the SERP ranking positions with the regional / meta filter. This way you could your SERP ranking position for,, etc..

  57. Cormac Moylan
    By Cormac Moylan on 2 September, 2009

    Thanks André, I was wondering if it was possible to dig down and determine whether or not the searcher picked “pages from” or “the web”. Thank you very much for the guide.

  58. Adam Audette
    By Adam Audette on 2 September, 2009

    Thanks Yoast, this is super useful.

    • Adam Audette
      By Adam Audette on 2 September, 2009

      Meaning, thanks André Scholten and, of course ;)

Check out our must read articles about Analytics