7Feb/113

Using Google Analytics to Track Rankings

By

Google Analytics is a great tool for tracking visitors to your website, but did you know that you could also use it to track your position in the Google search engine rankings?  Google's referral URL indicates the position of your page in the results by using the cd parameter.  You have to make some small changes with your account to start tracking, but it's quick and easy.  You'll be setup to track your position in the SERPs in a matter of minutes.

Create a New Profile

My first recommendation is that you create a new profile.  This will keep your search result tracking separate from your existing data and will ensure that information is protected from the changes we are going to make.   Once you sign in you will want to click on "Add Website Profile".  On the next screen click on "Add a Profile for an existing domain".  Select the domain you want to set up and name the new profile (I just did the "(site name) Rankings".

Create Filters

Once you are at your Analytics Settings screen you want to click on "Filter Manager" down on your bottom right.  The "+ Add Filter" link will be on the top right of the table shown.  You will be adding a few different filters so follow the instructions for each.

Include Organic Results

You want to make sure you are tracking only your organic results and not PPC ads.  Name this filter whatever you want, I chose "Organic Only", then choose "Custom filter", click the radio button next to include, select "Campaign Medium" in the filter field section, enter "organic" (without the quotes) in Filter Pattern and click no by case-sensitive.  Then apply the filter to the new profile you created.

Include Only Google

Since Google is the search engine that gives the cd parameter so you can track the actual ranking, you want to filter the organic results only to that source.  You want to create another custom filter.  Again, name it whatever you want but I chose "Google Only", filter type "Custom filter", click the radio button next to include, then select "Campaign Source" and enter "google" (without the quotes), then select no next to case-sensitive and apply to your new profile.

Filter the URL

One more customer filter and this one is filter the searches that contain the cd parameter.  Choose your filter name (mine is "Rankings Only"), select custom filter, then the radio button next to include.  Select "Referral" for the filter field and in the filter pattern copy (without the quotes) "google.com/(search|url).*bcd=d*", then make sure it's not case-sensitive and you apply to your new profile.

Extract Keywords and Ranking Position

Now you have to create a filter that will take out the keyword used, the ranking position, and the page it directs to.  For filter name you can use whatever you want, but I used "Extract Data", then create a custom filter and select the radio button next to "Advanced".  In "Field A -> Extract A" paste (without quotes) "bq=([^&]*)", then for "Field B -> Extract B" paste (without quotes) "bcd=(d*)", and finally in "Output To -> Constructor" you want to have (without quotes) "$A1 (Rank: $B1)".  In the Field A & B you want to select "Referral" from the dropdown box and for the Output constructor use "User Defined." Check the radio buttons next to yes for Field A Required, Field B Required, Override Output Field, and then No next to case-sensitive.  Apply the filter to your new profile.

Final Step

Technically you are all set and ready to go, but if the keyword term consists of more than 1 word you will find the %20 separating the words.  It can be tough to see.  Unfortunately you have to repeat this process for each space you encounter, so if you only create one filter just the first %20 will be filtered out and the rest will remain.  If you create 7 or 8 of these filters you can cover even most of the longest tail search terms.

Create another filter and name it "Separator 1".  It's a custom filter and click the radio next to "Search and replace".  The filter field will be user defined as "%20" (no quotes).  For the replace string, I use an underscore (_) but you can also use a hyphen (-).  Both of these provide a nice separator for the words in the string.  Make sure it's not case-sensitive again and apply to your new profile.

That's it!  Now you can start tracking your rankings inside of Google Analytics.

Related Posts:

Comments (3) Trackbacks (0)
  1. Great article!
    In the “extract keywords and ranking positions” step there are required dropdowns next to “Field A-Extract A”, “Field B-Extract B” and “output to constructor”.
    What should those settings be?

    • Sorry for the delay Morgan you got stuck in my spam for some reason. I have added the changes. You want to use “Referral” for Field A and B, “User Defined” for Output to Constructor.

  2. This is super awesome article to try it atleast once. If it works, I can set this up for all my websites. However, you provided “organic” for only google.com. Will this cover all rest of google’s extensions i.e. “.co.uk”, “.co.in”, “.com.au”? Or I have to create separate filters for each extension?


Leave a comment


Trackbacks are disabled.