Create the ultimate SEO report in Google Analytics

Skrevet af Esben Rasmussen i Google Analytics, SEO     Comments 16 kommentarer      

This is how you prepare the SEO data in Google Analytics.

First you have to create some goals.

Click on “Edit” on the right hand side of the profile where you wish to have your SEO report.

Now set up six goals so they match the screenshot.

Overview of the six SEO goals

The process for creating the goals are as follows (see screenshot below):

  1. Name the first goal “Google rank 1-3” by typing it into the field Goal name
  2. Make sure that Active goal is set to On
  3. MAke sure that Goal type is set to URL Destination
  4. For Match type select Regular Expression Match
  5. In the text field Goal URL type “/googleRank/[1-3]\.html” (without the quotation marks)
  6. Click the button Save Goal

Repeat this process for the next five goals where you adjust the names and regular expressions accordingly.

Here are my naming suggestions and their corrosponding regular expressions (shown in brackets).

Second goal: “Google rank 4-6″ – [/googleRank/[4-6]\.html]

Third goal: “Google rank 7-9″ – [/googleRank/[7-9]\.html]

Fourth goal: “Google rank 10-14″ – [/googleRank/(1[0-4])\.html]

Fifth goal: “Google rank 15-20″ – [/googleRank/(1[5-9]|20)\.html]

Sixth goal: “Google rank 21 – 99″ – [/googleRank/(2[1-9]|[3-9][0-9])\.html]

Now all you need is a nice report which uses these goals – easily done!

Read more on the next page on how to create the ultimate SEO ranking report.

Sider: 1 2 3

16 kommentarer til “Create the ultimate SEO report in Google Analytics”

  • Although there are many weaknesses in using cd= as tracking parameter for SEO ranking, interesting solution. Especially the possibility for using alerts if ranking drops is a nice approach.

    By the way, it’s possible to achieve the same without implementing any extra codes into the website.
    Some advanced filters in Google Analytics will make it possible to extract this information and rewrite the URLs into “ranking goals”.

    • Hello Eivind

      Thank you for the feedback.

      Just out of curiosity, which weaknesses are you referring to? I mean, I know that not every browser reveals the referrer and that image results don’t use cd= (but instead use start=) but which other weaknesses would you say that cd= suffers from?

      In my opinion, if you have enough data, cd= can actually be a rather precise tool, since it reveals your subjective rankings due to the personalization of Google results, whereas more professional tools (to my knowledge) try to measure the objective ranking.

      My point being that users see subjective results and not objective, so cd= comes closer to what your users see.

      And thank you so much for pointing out that it can be done without using code. You are of course absolutely right. The reason this approach uses code is actually just re-use of code from the SEOmoz post which inspired me.

      Will definately have to try to set it up without code.

  • I should have put “weakness” in quotes, because the weakness is in the knowledge of how thing is counted with the cd parameter.

    A person not very familiar with SEO will think that the cd parameter reflects what he sees:
    10 results per page, so cd=10 will be the last result on page one. But with site links and universal search in place, what a person sees as an number 5 spot in SERP could be tracked as cd=10. Cd=18 you would normally think is on page 2, but it could be on page 1 as well.

    Another example is that if you expand a search result, cd will start from 1 again in the expanded search result.

    I know this “warning” is mentioned in the SEOmoz article (and other articles as well), but still…

    With other words, I agree with what you say that it can be a pretty precise tool, and your method (with alerts) makes it easier to get a better picture of rankings and react to changes, but there are some “but’s” with the cd parameter. 🙂

    • Thanks for clarifying – I completely agree with you.

      And yes, I should probably have mentioned some of the “but’s” you mention, because they are of course very relevant… So thank you for adding this info. 🙂

  • Very good tutorial for ranking analytics. Thank you so much. you saved my life.

    • Hi Joe

      Thanks for the comment – really appreciate it!

      Good to hear that it was of use to you. 🙂

  • I have just updated the blog post with information on how to achieve the same result without extra javascript – just by creating an advanced filter i Google Analytics.

  • Hi!

    Your tutorial is super nice.

    I have one question – is there a way I set a daily analytics alert to show which keywords haven’t got any traffic yesterday, but got traffic today?

    It seems is easy to set custom alerts for single pages, but I want to set custom alerts for keywords, in general, not just one keyword.

    • Hi me

      Thank you for the kind words.

      The thing with Google Analytics is that it only registers what happens – it cannot process what doesn’t happen.

      This means that you cannot say “Give me an alert when {unspecified} [keyword] is used AND [Goal conversion rate] = zero yesterday but is > zero today”.

      The reason being that yesterday your keyword wasn’t registered – which means Google Analytics cannot compare today with yesterday because yesterday the keyword didn’t exist (according to Google’s knowledge).

      If I understand your intention correctly, what you really want is to be notified, whenever a new keyword is used: I am afraid this can’t be done in Google Analytics. You have to see if there is another (probably paid) service which integrates Google Analytics API, that offers this kind of datamining.

      Alternatively you can do it yourself (although this contradicts the purpose of alerts) by downloading your statistics and maintaining a spreadsheet where you automatically sort the list into the separate keywords.

  • Hi, since i installed the special code. My overall traffic stat went down about 70%. I have done it on 2 sites and they acted they same. i wonder what went wrong. Please help. Thanks

    • Hi Joe

      Definitely sounds weird!

      Since you didn’t mention which sites were having problems I took a chance and looked at the website which is sort of mentioned in your email address.

      On that site I can see that the Google Analytics code has been implemented twice. The first instance is my code and the second is a standard analytics code.

      Having two instances of the same Google Analytics code will definitely mess up your data. You should either use my code or your own – but not both. 🙂

      I would also recommend that you use the updated version of my code which works better in Internet Explorer.

      Seing as you are using the asynchronous version of the Google Analytics code I would also advise you to move it so it is located in the head section of your website per Google’s recommendations: http://www.google.com/support/analytics/bin/answer.py?hl=en&answer=174090

      However, if you want to make sure that the code doesn’t give you any trouble, you could try to remove your implementation of my Analytics code and instead use my guide (in this article) to achieve the same result by using a filter in Google Analytcs.

      This means that you can create virtual pageviews containing the SEO rank by using a filter in Google Analytics instead of having to rely on code to do it for you.

      Hope this helps

  • This is wonderful. I am implementing on our company site. I will want to see that we can segment using the new page (meaning I can create an advanced segment for all visits where the page “/googleRank/1.html” was seen, and then see the behaviors on site from there.

    • Hi Cindy

      Glad you liked it. 🙂

      You could try to use regular expressions (see http://www.onlinekonsulenten.dk/seo/monitor-your-seo-with-google-analytics/2/) and then create the segments Googlerank 1-3 and Googlerank 4-6 in order to compare their metrics such as bouncerate.

      I am currently finishing my masters thesis and based on my research it would appear that results in the top 3 (to some extent top 5) in the SERP “automatically” inclines people to be more positive towards your website than lower ranking results with just as good snippets. So basically a higher ranking means a better user experience.

      However, if this is what you want to see, you probably need to look at more than just “/googleRank/1.html” (which isn’t a SERP number but the individual ranking number of the result itself) – which is why I recommend using regular expressions. 🙂

  • Thank you so much for this very interesting and highly useable guide! 🙂

    I, however, have a question: How will storing the Google Rank in the “Request URI”-variable influence the “Landing page”-variable?

    If there is an influence: How can this possibly be avoided? – As I would like to have both the “Landing page” and the “Google rank” variables available for segmentation in my reports 🙂

    And do you have any good, intuitively understandable, explanations on the “cd=”?



    • Hi Lars

      Glad you found it useful!

      Yes, it will have impact on the landing page variable since the landing page will seem to be “/googleRank/#” – which is why I recommend that you separate the SEO-filter/profile from your normal profile.

      That way you can always see the “true” unmanipulated data in the normal profile and for extra SEO knowledge you can use the SEO-profile.

      If you need to create segments based on SEO data, then my SEO overview using virtual pageviews, is propably not the way to go.

      Instead I would either:

      1) select that the “Output to -> constructor” outputs to “Used defined”.
      2) Follow the method described here: http://yoast.com/track-seo-rankings-with-google-analytics/

      Using either of these methods will make you able to acces the SEO data and use it as a custom segment without it affecting your pageviews. However, this also means that you cannot create the same overview and alert I present in this article.

      When you have used either one of the above solutions, all you need to do is create a custom segment with the appropriate regular expressions in order to make the needed filtration (see http://www.onlinekonsulenten.dk/seo/monitor-your-seo-with-google-analytics/2/).

      With regards to the “cd=” as a rule of thumb you can think of it as the ranking number of the individual search result, however there are som “buts” to be aware of.

      For more in depth information about this, I would suggest that you read this blog post and its comments: http://www.seomoz.org/blog/tracking-organic-ranking-in-google-analytics-with-custom-variables

    • Now that I’ve had some more time to think about it, I believe there is actually a third option, which enables you to both use my SEO overview AND keep the landing page intact.

      This solution, however, requires you to use the code version instead of the filter version, since this enables you to call Google Analytics twice with two different URL’s.

      This is the code I have suggested above:

      /* Added SEO tracking code begin */

      if(document.referrer.length > 0){
      var regex = new RegExp("cd=([0-9]+)");
      var match = regex.exec(document.referrer);
      var rank = match[1];

      if (match) {
      _gaq.push(['_trackPageview', '/googleRank/' + rank + '.html']);

      /* Added SEO tracking code end */


      Instead of calling the virtual pageview first try to call it second:


      /* Added SEO tracking code begin */

      if(document.referrer.length > 0){
      var regex = new RegExp("cd=([0-9]+)");
      var match = regex.exec(document.referrer);
      var rank = match[1];

      if (match) {
      _gaq.push(['_trackPageview', '/googleRank/' + rank + '.html']);

      /* Added SEO tracking code end */

      This way you call the normal pageview tracking first and if there is “cd=” in the referrer string then the second virtual pageview is called.
      Be sure that if you use this method that you filter these virtual pageviews out of your standard analytics profile.

Skriv kommentar

Please insert the signs in the image: