Tracking Keyword Ranking Position with Google Analytics

Google recently announced a change in the format of the referring URL for visitors finding your site through keyword searches.

The new format promises to reveal much more information about the search result rankings that was previously available, and this post will show you how to take advantage of that information to tune your SEO efforts using Google Analytics.

Starting this week, you may start seeing a new referring URL format for visitors coming from Google search result pages. Up to now, the usual referrer for clicks on search results for the term "flowers", for example, would be something like this:

http://www.google.com/search?hl=en&q=flowers&btnG=Google+Search

Now you will start seeing some referrer strings that look like this:

http://www.google.com/url?sa=t&source=web&ct=res&cd=7&url=http%3A%2F%2Fwww.example.com%2Fmypage.htm&ei=0SjdSa-1N5O8M_qW8dQN&rct=j&q=flowers&usg=AFQjCNHJXSUh7Vw7oubPaO3tZOzz-F-u_w&sig2=X8uCFh6IoPtnwmvGMULQfw

What does that mean for me?

Common speculation is that the cd parameter in the referral URL indicates the position of your page in the search results, and this has been confirmed by Matt Cutts.

Knowing what position your pages hold in the SERPS for a given keyword can be enormously helpful to your SEO efforts, so it makes sense to start tracking this new data. Prior to the change in referer, it was possible to track your SEO rankings with Google Analytics, but you could only get information about the page on which you were ranking for a keyword search, not your overall position.

Create a New Profile

You are definitely going to want to create a new profile within Google Analytics so that you do not interfere with the data that is already being collected for your site (The profile that we are about to set up will only capture data for organic search results from Google that use the new referer string).

Sign in to your Google Analytics account and "Add a Profile for an Existing domain". You can give it any name you like, I chose to use "Google SERP Ranking".

step-1-create-new-website-profile

Create the Filters

The first thing that we need to do is create a couple of filters to make sure that only organic google searches are included in this profile. Order is important, so make sure that you either create your filters in the order that they are described here, or that you go back when you are finished and reorder them appropriately.

1. Include Organic Search Results

Create your first custom include filter using the Campaign Medium filter field and a filter pattern of organic.

step-2-include-only-organic-search-results

2. Include Google Search Results

Create another custom include filter using the Campaign Source filter field and a filter pattern of google.

step-3-include-only-google-searches

3. Include New Google Referral URL

Create the final custom include filter using the Referral filter field and a filter pattern of google.com/(search|url).*\bcd=\d*.

step-4-include-new-google-referer

4. Extract Keyword and Ranking Data

The last filter we need to create is an advanced filter that will extract data from the referal string and create custom output that will be viewable in our reports. Create an advanced custom filter, and set the pulldowns, text areas and radio buttons as shown in the screenshot. This will extract the keywords and SERP position from the referal string and replace the output with our own custom string in the format <keyword> (Rank: <position>)

step-5-construct-output

Visualizing Results

Once you have created the new profile and filters, and have started receiving traffic, you should be able to see the keyword/ranking data in any of your reports when you change the dimension to User Defined Value.

results

Please share your experiences with this or any other helpful Google Analytics tricks that you use!

Comments

19 Responses to “Tracking Keyword Ranking Position with Google Analytics”

  1. Brian Chiou on April 17th, 2009 11:50 pm

    Thank you Chris!

    I followed this tutorial step-by-step and we have received our first day of keywords with their respective ranks. I forgot to set up goals for the new profile, so I guess we'll have to wait until tomorrow if any of these keywords are creating successful goal conversions.

  2. Brownoxford on April 18th, 2009 1:33 pm

    Great Brian, I'm glad you found it helpful!

  3. Mario Fox on April 25th, 2009 12:07 am

    Awesome post. help me a lot. :) cheers.

  4. Brian Chiou on April 28th, 2009 4:47 pm

    Hi Chris,

    I had set up these series of filters for the Newfangled website. It is listing out the keyword rankings perfectly. However, I set up several goals which I had duplicated from another profile which listed all organic traffic from Google. The organic traffic profile showed several goal conversions whereas the profile set up to show keyword ranking registered zero goal conversions.

    After further analysis, I noticed that the keyword ranking profile does not show pages after the landing page, unless the landing page was refreshed. Meaning, the pages/visits is hovering around 1 page per 1 visit.

    If the above is the case, then it explains why no goal conversions were being registered.

    Have you heard of anybody else encountering this issue?

    (I might just be completely missing something though)

  5. Brownoxford on April 28th, 2009 5:01 pm

    Hi Brian, my initial thoughts are that the landing page is the only one included in this profile because one of the filtering requirements is the presence of the google-specific string in the referring URL (which is only present with the first page visit).

    I'd be very interested to hear if you are able to work around this somehow, as being able to track conversions based on the keywords and SERP position would be very handy.

  6. Brian Chiou on April 28th, 2009 8:17 pm

    Hi Chris,

    Thanks for the quick response. Phew. So it wasn't me just thinking I was going crazy. I'll let you know what I find as well as confirming step #3 being the filter that is only including the landing pages in the profiles.

    Thanks again for your help!

  7. Brian Chiou on April 29th, 2009 8:54 am

    Chris,

    I removed filter #3, and the profile now tracks pages deeper than just the landing pages. Some keywords and their respective ranks are also being tracked, but the majority of the organic traffic is encompassed under one keyword (not set). I hope this confirmation helps you in some way.

  8. Barbara Feldman on May 8th, 2009 12:58 pm

    Great idea! I am implementing this, but apparently had a few typos in my filters because the screen shot was a bit hard to read.

    Would it be possible for you to post the regular expressions (for the filters) in plain text so that we could simply copy and paste them?

    Thanks again.

    Barbara

  9. Marty on May 10th, 2009 6:29 pm

    @Chris: Thanks for taking the time to do this tutorial. My question is--does GA aggregate the "average" click position with keywords which resulted in multiple clicks?

    I'm going to test this on a couple of sites tomorrow. As you know, ranking reports are way dead and SEOs have been measuring success by looking at monthly average search frequency (Google AdWords API) & traffic to site.

    This allows marketers to determine what "percentage of search market share" the site is achieving. It gets more granular when you mash in data from the Trellian API to improve one's read on "inventory," in the form of how many global searches are levied.

    With a little work, adjustments can be made for seasonality as well. Anyway, thanks for the post and pleased to meet you. Cheers.

  10. Marc on May 21st, 2009 2:04 pm

    In comparing my organic Google traffic in one of my main profiles vs. what I'm seeing in this new custom profile, I'm seeing only a fraction in the latter vs the former.

    Is this because of the third "include" filter? Only some of the referral URLs from Google's organic results contain the cd= parameter, and we're only seeing those in the new profile?

    I did double-check my transcription of the regex's from the screenshots.

  11. Brownoxford on May 21st, 2009 2:16 pm

    Marc, you're right about the 'cd' parameter. Google has not completely rolled out the new referral URL format yet, so only some of the referrals from Google SERPs will be using the new format.

  12. Stef on June 12th, 2009 5:09 am

    Great article-i found this really useful. A person needs to be aware of these changes on google.

  13. Bernardo on July 7th, 2009 3:15 am

    Hi Cris,

    I have doubled checked my profile configuration, but all I get is a blank page statement like this: keyword(page:)

    Any thoughts?

  14. Eddie on July 22nd, 2009 4:52 pm

    Thx Chris but when I drill down to user defined value for traffic sources>search engines and I got a (not set)result. So for its been about a day and I got less than ten visits. I followed the directions to a tee but should I make any adjustments?-Eddie

  15. mads H on August 18th, 2009 11:01 am

    HI

    fantastic.. if this can do what i think, then there is no need to pay any of the expensive software tools as IBP.. do you agree?

    can you please type in the text for filter 4 in plain text so we can type it in?
    i cant see some of them on my screen! :(

    thanks again!

  16. SwitzerBaden on August 24th, 2009 8:51 am

    Step 3 is including information from the organic results from google.com. Has anyone had experienced with implementing this for other locations as well (ie google.fr, google.de)--maybe like this:

    google.(com|de|fr|co.uk)/(search|url).*\bcd=\d*

    or maybe this would adulterate the results by mixing positions from different data-centers. Any thoughts?

  17. Ben on August 27th, 2009 4:35 pm

    Thanks for this article. Please let me know if you figure out the Google Base/Shopping test from the post above.

  18. Boot Camp on December 8th, 2009 7:51 pm

    Great article. This will help us evaluate keywords so much!

  19. aimClear’s 2009 Daily Training Link Library » aimClear Search Marketing Blog on January 1st, 2010 6:32 pm

    [...] Tracking Keyword Ranking Position with Google Analytics 5/8 [...]

Got something to say?