Home

Archive for the ‘google analytics’ Category

Innovative way to track SEO ranking

Monday, December 28th, 2009

Track SEO rankings?

Well, you can’t specifically track the exact position of the keyword that was clicked like you can do with AdWords. But it is possible to determine the page he was on. A ranking tool can tell you over and over again that a certain keyword is around position 15 in Google while Google Analytics claims he is on page 1 (position 1 to 10). This effect can come from ‘personalized search’ or ‘local results’ that can influence the Google rankings dramatically. People see other results than you see with your ranking tools. And therefore you need Google Analytics to do the real ranking.

Setup the filter

To get the rankings in your Google Analytics reports you have to create a new filter:

analytics google ranking

The title of the filter contains a 3, that’s because filter 1 and 2 take care of filtering out everything else than Google Organic traffic. So yes: you also have to create a new profile to apply these filters on to be sure you don’t screw up your main profile.

This filter only works for Google. if you want it to work for Yahoo and Live Search also, make sure you change the filters 1 and 2 so they accept Organic from all three of them. Then setup the filter like this:

analytics ranking

The ranking results

After a while the “User Defined” report will look like this (ignore the language):

rankings example

What you see are not the actual rankings, but the number of the first result of the page the keyword was on. So when you see 20, it means the keyword was on the third page, and a 50 means the sixth page. (Yahoo and Live Search will report 21 and 51 in stead of 20 and 50).

When you don’t see a number but only “(page: ): it means the keyword was on the first page. So perhaps it is better to change “page:” to “minimal position;”, I leave that up to you.

If you want to filter the list of keywords on keywords with at least a page 2 position you can use “\(page: \d{2,3}\)” in the filter field below the list. The \d stands for digits, and the 2,3 for the amount of digits you’re looking for.

Enjoy.

This excellent post was written by André Scholten and was originally published in yoast.com


DiggRedditSlashdotTwitThisSphinnStumbleUpondel.icio.usFacebookGoogleTechnoratiE-mail this story to a friend!

Google Analytics Annotations

Friday, December 25th, 2009

This is just brilliant. A simple feature that will make my life so much easier.


DiggRedditSlashdotTwitThisSphinnStumbleUpondel.icio.usFacebookGoogleTechnoratiE-mail this story to a friend!

Track non HTML files with Google Analytics

Thursday, May 29th, 2008

Google Analytics is based on Javascript. Since Javascript can be placed only in HTML files, tracking non HTML files like pdf, zip, mp3 and others is a little bit tricky. But it is possible.

In order for Google Analytics track downloads of an mp3 file from your site, do the following:

1. Add the Google Analitycs tracking code ABOVE the the link to your downloaded file. If you already have the Google Analytics code in your site footer, and you probably do, place the same code again, but remove the call to _trackPageview().

example:

<script type=”text/javascript”>
var gaJsHost = ((”https:” == document.location.protocol) ? “https://ssl.” : “http://www.”);
document.write(unescape(”%3Cscript src=’” + gaJsHost + “google-analytics.com/ga.js’ type=’text/javascript’%3E%3C/script%3E”));
</script>
<script type=”text/javascript”>
var pageTracker = _gat._getTracker(”UA-xxxyyyy-z”);
pageTracker._initData();
</script>

2. Edit every link you want to track, in the following way:
In case your link looks like this:

<a href=”/downloads/file1.mp3″>Hava Nagila</a>

change it to look like that:

<a href=”/downloads/file1.mp3″ onClick=”javascript: pageTracker._trackPageview(’/downloads/HavaNagila’); >Hava Nagila</a>

The clicks on this link will appear in Google Analytics as if the page /downloads/HavaNagila was actually viewed, even though there isn’t really such a page.

You can read more about this issue and others in Google Help Center.


DiggRedditSlashdotTwitThisSphinnStumbleUpondel.icio.usFacebookGoogleTechnoratiE-mail this story to a friend!

Disable Google Analytics

Sunday, March 16th, 2008

If you would ask me what is the best Google Analytics resource, I would’nt think twice before sending you here. However, for the problem we had we found something different. I’m using Google analytics quite a lot on every site I work on. Recently we had a problem at one of my customers sites, where the marketing people working in that company were browsing their website all day, searching in Google their website keywords again and again, and made Google Analytics reports become unreliable. There were so many visits in the reports that were not real customers but our own staff, that we didn’t really know which part of the report was real and which part was our own tracks.

Like in every crime scene, we just needed our guys to put on gloves before touching everything…

The solution was very simple.

1. We created a file called disable_analytcis.php

<?php
SetCookie(”disable_analytics”,”1″ ,time()+91536000,”/”);
echo “Yuhu!, Google analytics is disabled!”;
?>

2. In the site footer, next to the Google analytics code, we added this:

<?
if (!empty($_COOKIE[’disable_analytics’]))
{
echo “Google analytics is disabled”;
}
else
{
?>
//put google analytics code here…
<?
}
?>

That was easy. The hard part was to send the link to disable_analytics.php to all the sales and marketing in that company and ask them to click on the link. They ALL wanted to know exactly WTF is going on here… are we spying on them? yes? no? what do you mean Google keeps track??? anonymous? who authorized this… :)

Once everybody got their cookie, our statistics cleared up. Real client analytics emerged and logs turned useful again. When you do it on your site, make sure your cookie gets to all computers, home computers, laptops and any computer that you don’t want to track.

update: (Thanks Pieter!)
Google offers cookie based filters, as described in Google Analytics Help Center:
Create an Exclude filter to remove data from visitors with this cookie. Follow these instructions to create a filter with the following settings:
Filter Type: Custom filter > Exclude
Filter Field: User Defined
Filter Pattern: disable_analytics
Case Sensitive: No


DiggRedditSlashdotTwitThisSphinnStumbleUpondel.icio.usFacebookGoogleTechnoratiE-mail this story to a friend!