How To Track Google Keyword Rankings In Google Analytics

Martin Brinkmann
Sep 12, 2009
Updated • Nov 28, 2012

Professional webmasters, and also many other website owners, need a way to keep track of keyword rankings of their website. Keyword ranking simple means the position in selected search engines of a website for a specific keyword. Ghacks is for example ranking on the first spot in Google, and probably in every other search engine out there, for the term ghacks. Many webmasters want to keep track of rankings to be able to analyze their website's performance and be ready for future optimizations to increase the traffic and thus the reach of the website.

SEO tools like WebCEO or SEO Elite are normally used to track rankings of keywords. It is also possible to check them manually which is fine for a few selected keywords but impossible for webmasters who track hundreds or even thousands of keywords.

I recently came upon a post on a blog that explained how to track Google rankings in Google Analytics. It did not work at first and I had to fix an error before the ranking tracking was actually working. Below is now the explanation on how to track a website's ranking in Google.

You start by adding a new profile to an existing website. Start by clicking on the Add New Profile link on the right side of the overview of all websites that have been added to Google Analytics.

Now select to add a profile for an existing domain, select the domain from the drop down list and give it a unique name, e.g. website rankings. A click on continue will create the new website profile which will initially track the same data that the original profile is tracking.

You will be taken back to the profile overview page. Click on the edit link next to the newly created profile. Click on the Add Filter link on the right lower side of the profile detail page.

We need to create three new filters:


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


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)

It then takes a few hours before the first rankings can be checked as the new profile will start tracking traffic beginning with the time it was created.

The rankings are then accessible by clicking on Visitors > User Defined when checking the stats of a website. They look like this

google rankings

And there you have it. A dead easy way to track keyword rankings in Google.


Previous Post: «
Next Post: «


  1. John newman said on March 4, 2011 at 2:58 pm

    I think keyword ranking is more applicable when you choose adword to advertise your product or service online. The description should contain your keywords and it should be unique in nature. The content of ad should entice the reader and also should match the topics on your product description or the article about your service.

    1. softnwords said on March 4, 2011 at 3:04 pm

      It is fine .I do agree with the keyword tracking tool.I want to set up this tool to promote my business.

  2. Sarah Bouchard said on February 21, 2011 at 10:19 am

    I just want to say I am newbie to blogs and honestly liked this blog. Most likely I’m going to bookmark your blog . You actually have tremendous posts. Many thanks for sharing with us your web-site.

  3. Tim said on February 10, 2011 at 1:33 pm

    Thanks for this. Just checking through, on the second filter with ‘campaign source’ it only includes Google, hence some of the traffic being (not set) as it is from other search engines.


  4. Jean from faalangst said on November 18, 2010 at 9:21 pm

    That’s a great tool. I will set it up asap. Thanks!

  5. Manpreet said on November 27, 2009 at 7:38 am

    Hi Martin,

    Given code is not working. Filters are implemented as per your instructions. I am only getting ‘not set’ as a result.

    Will you be able to give a solution for this.

    1. Jose said on November 30, 2009 at 11:46 pm

      Same problem here. 469 out of 544 results are “not set”.

      The screenshot:

      1. stan said on December 3, 2009 at 11:02 pm

        I too seem to have experienced this problem, The script is only partially working for some reason here is a screen shot..

        I have had the script on for over 3 weeks of activity. Keep up the good work!


      2. Martin said on December 1, 2009 at 12:20 am

        It might take a while because the filter is not able to turn old results into results that show the rankings. Wait a few days and filter by that time period only, how many not set are shown then?

    2. Martin said on November 27, 2009 at 11:17 am

      Can you provide screenshots? Where do you get Not set?

  6. DanS said on November 11, 2009 at 5:22 pm

    Can someone please help?

    I’ve set this up and the keywords are pulling through, however it displays like:

    ‘keyword+keyword (page: £B2)’

    What have I done wrong? I’ve followed the instructions to the letter.

    Thank you in advance

  7. DanS said on November 11, 2009 at 12:03 pm

    Beautiful! Just set it up so will see in a few hours :)

  8. Jessica said on September 29, 2009 at 9:53 pm

    Fantastic tutorial and exactly what I was looking for – thanks!

  9. Brands-and-Jingles said on September 15, 2009 at 7:54 pm

    Pretty cool indeed. Thought I have installed it a while ago based on Joost descriptions – it works pretty well.

  10. theVika said on September 13, 2009 at 6:16 pm

    Thanks. Very usefull tool!!!

  11. Rahul said on September 13, 2009 at 2:45 pm

    Thanks for information . i was looking for this.


  12. Sanatate said on September 13, 2009 at 6:15 am

    very useful post. thanks

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.