Advanced use of Google Analytics and the new interface

Update: following lots of peoples questions I have posted Google Analytics Tutorial Part 2

Google Analytics
Since Google Analytics was launched in 2005 it has become one of the top analytics packages for small to medium sized websites. Growth was initially slow due to the frustrating waiting list system initiated by Google to avoid over stretching their servers. Now that the waiting list has been removed anybody can sign up to use this great service.

The user interface had a major redesign in May 2007 and a lot of the features we love have become hard to find. This guide should help you find your way around the new system.

I see a lot of comments on the forums asking whether Analytics can do X, Y and Z. In most cases it can do it but people just don’t realise it. As webmaster of several large sites I have been using GA for around a year now to track a huge number of variables. In this post I will go through a few of the more obscure interactions that GA can tack on your site.

Tracking exit clicks, banner clicks and RSS feed subscribers

Have you ever wanted to know how many people clicked on a particular link or banner on your site? You may wish to find out how many people click on an affiliate link, how many people from a certain country click on your banner advert or even the number of visitors from Digg that clicked to sign up to your RSS feed.

GA can track this for you quite easily by simply adding an onClick event to your hyperlink code.

<a href="http://www.example.co.uk" onClick="javascript:urchinTracker ('/outgoing/rssfeed'); ">

Every time somebody clicks on the link above GA will register a page view on the page www.yoursite.com/outgoing/rssfeed. To view the stats for the link you will need to follow the directions below:

Select Content and then Top Content

In your GA account visit Content > Top Content and you will see the most popular pages on your site. Enter the term “outgoing” into the filter box as shown below and you will see a list of all the pages on your site with “outgoing” in the url. Normally this will just show exit clicks unless you happen to have real pages with “outgoing” as part of the url.

Drill down to the content you require

To drill down into the data simply click on the url you are interested in and you will see a snapshot of data like the image below.

Page snapshot

(screenshot courtesy of Gas Fires Galore) If you want to drill down further by clicking on the “Segment:” drop down menu you can see details such as the source of the visitors, the keywords they were searching for and the landing page they arrived on.

This data is extremely valuable to webmasters who are not selling products. Sites selling products can measure ROI accurately by looking at the profits made on a particular sale compared to the cost of obtaining the visitor whether by SEO or Pay Per Click marketing. If you don’t sell products you need to place a value on other aspects of your site. How much are you willing to pay to acquire another blog subscriber? Was the $5000 you spent on link bait worthwhile?

All these actions can be tracked using the onClick event in Google Analytics.

More information at the Google Help Section.

How do I track downloads?

Downloads can be tracked again using the onClick event as above:

<a href="http://www.example.co.uk/files/map.pdf" onClick="javascript:urchinTracker ('/downloads/map'); ">

More details

Tracking ecommerce revenue

Tracking where your visitors come from is very important. Tracking where your actual customers came from is even more important. If you knew that people searching for your keywords on MSN Live were twice as likely to buy your product as people searching on Google you can happily bid far more for your Adcenter clicks as your Adwords clicks.

Sales reports by traffic sources can be found under the “Traffic Sources > All Traffic Sources” section of the menu.

Before explaining how to track your transactions lets look at the data that GA can provide on this subject. These figures are for April 2007. Some details are blocked out for privacy reasons.

Revenue from different sources

Lets drill down into the stats for Google (keywords removed):

Revenue from different keywords

From the chart above we can see that some keywords earn £31.52 per visit whereas some only earn £5.72 per visit. This data is hugely valuable as you can adjust your PPC bids on high and low paying keywords to maximise your profits.

GA also lets you drill down to see stats such as the number of people who bought product A after searching Google for Product B.

Now we know why we need to see these stats it makes the task of enabling the tracking slightly more appealing.

How to track Sales

To track your sales you will need to use some server side script on your confirmation page (the page people see after they complete a transaction on your site) to populate a form in the following format:

<body onLoad="javascript:__utmSetTrans()">
<form style="display:none;" name="utmform">
<textarea id="utmtrans">UTM:T|[order-id]|[affiliation]|
[total]|[tax]| [shipping]|[city]|[state]|[country] UTM:I|[order-id]|[sku/code]|[productname]|[category]|[price]|
[quantity] </textarea>
</form>

Example

UTM:T|34535|Main Store|111108.06|8467.06|10.00|San Diego|CA|USA

UTM:I|34535|XF-1024|Urchin T-Shirt|Shirts|11399.00|9

UTM:I|34535|CU-3424|Urchin Drink Holder|Accessories|20.00|2

Once you have populated the form GA will start tracking your sales right away.

The Google Help Section has a good reference guide for this topic.

Tracking 404 errors

Google Analytics makes the process of tracking your 404 errors fairly straightforward. Simply add the code below to your error page and GA will tell you the source of the traffic that is generating the error.

Make sure you replace the xxxxx-x with your GA account number!

<script type="text/javascript"
src="http://www.google-analytics.com/urchin.js">
</script>
<script type="text/javascript">
_uacct = "xxxxx-x";
urchinTracker("/404.html?page=" + _udl.pathname + _udl.search);
</script>

If there are any other advanced features of Google Analytics you would like us to talk about or if you have any questions on how to implement these ideas please post in the comments below :).

64 Reader Comments leave yours >>

Thank you. Very helpful tips.

 

Wow - thats very helpful. I had no clue I could do most of these things.

 

Brilliant article!

 

Very helpfull informations you gave us! Thanks again!

 

Thank you! I\’m going to install the script for the 404 page today. I had no idea that I could track clicks on my affiliate links outside of linkshare. Thanks!

 

Great post. Thanks!

 

Is there a way to see stats based on a specific day? I’d love to be able to see which pages are more popular as I’ve changed my site over time. I might change link position or something for a week and it’d be nice to see stats for that time period only to be able to compare them.

 

Thanks for this wonderful article. Google Analytics have definitely come a long way from it’s beginnings as Urchin.

 

How do we track flash movie plays with google analytics?

 

The worst change in their beta is the Geographic map. Now, instead of being able to get useful information at a glimpse (the scattering and concentration of bubbles on a map); you now have to drill-down several layers to get anything useful.

The idea of grouping entire continents (the Americas as a single continent) make for a worthless summarization — esp given large bubbles that you could previously discount as anomolies now skew an entire geographic region.

Please, Google, change this back to the way it was.

Adam Selene   June 11, 2007 6:36 pm | Reply

 

Thanks some very helpful tips. Is there anyway to attach the onclick event handler on a link I want to track without editing the html, perhaps at the bottom of the page? Just wondering if it is possible to separate the HTML from the javascript so it is easier to maintain.

 

There are some things still only available in the old UI though, such as graphing country-specific visitors.

(odd how many f4rrests there are reading this, eh?).

 

Surely there is javascript to add that javascript to every external link? it seems dumb to have to rewrite your whole application.

 

bravo. lots of interesting tips in here!

 

I allow my users to place Google analytics on the blogs that my site (http://www.dealminded.com) generates automatically. I think Ill add a few of these features for them as well…. Thanks!

 

Thanks a lot. I lost hairs on my head trying to figure some of this stuff out over the last few weeks.

 

VERY useful tips, thanks!

 

Good article. Can GA be used to track registered users and their activity on site?

 

Google is still lacking when it comes to actual rss requests from readers unfortunately. It would be awesome to get something that registers actual requests instead of just clicks. Might be impossible though since it’s all xml.

 

Thanks
But now lots of work to do.
In the end a person says - how did i ever live without these tools
But yet at the front end of the boat it takes a lot of weight, time and effort

 
 

I would love to know how to view the pages sending traffic in the referring information statistics. Not just the domian but a link to the actuall page sending traffic.

 

Newbies like me, will definitely be surprised, how you guys find these kind of secretive information.

Awesome… dude. I am going to use this for my site http://talentshakes.com

Nick.

 

Thanks for all your comments and questions, I will be writing a new post on the blog next week to answer all the comments in this thread. Smile

Patrick

 

great article!!

daryoko rispurwanto   June 12, 2007 4:48 am | Reply

 

This is definitely useful. Awesome Smile

 

Excellent, a non-intrusive way to track outgoing links. Thanks!

 

I purpose you a greasemonkey user script to add an external link to see referers on Google Analytics. You can see it here

 

any reason the page is scrolling horizontally ??? Or is it just my funky computer ?

 

Jonny X, I think you’re looking for something more like http://www.Ranktrend.com

It complements Google Analytics and gives you a pretty good visualization of your ranking trends.

 

Great article! I too am amazed at how much Google provides for free, although you have to look around for it. Thanks so much!

 

wicked article thanks

 

Thanks for this quick article.

note that most of your examples are achieved using filters instead of modifying your page code ;)

Also, if you want to track all outbound links, consider using a modified version of this wordpress plugin:
http://cavemonkey50.com/code/google-analyticator/

Cheers from the capital of Europe ;)

Julien

 

I’ve added the 404 reporting code. I can see from GA that the page is being viewed, but how do I tell what the source page was?

 

Is there a way to automatically log all your outgoing links without having to manually add all those links to your archives?

The plugin mentioned above by Julien looks a bit buggy (from the comments).

Would anyone be able to write some code to autotag certain links using JS to achieve this result? Something that would look for a certain link (you specify) and automatically add the onlick event? Is that possible?

 

Hello,
<
BR>
First off thank you for the postings, really apprecaited! Ok, so I have conversion tracking on for adwords java, then I have google analytics java, then I put in the servier side script and that javascript above on my “thank you page”. However I don’t see any results or open columns in my interface for sales tracking. Any help or recommendations would be of great help. Thank you!

 

You might want to consider modifying your javascript to include keyboard-only users.

 

Very useful tips!, at least for me!

Thank you! Smile

 

The Google Analytics Authorized Consultants (of which we are one) offer training classes for companies of all types and knowledge levels and have very reasonable fees.

 

Does my comment here increase visibility for ThePrimeSpot.com ?

How so and How much… that is the question!

PS Thanks for sharing this info;)

 

My host server does not allow javascript in hosted pages. Is there an HTML version that may only report basic info, but still be a Google interface?

Ted the money broker   June 26, 2007 2:02 pm | Reply

 

My ranking changed but the google bots had not crawled my site in several weeks. How does this happen? It made me wonder if the GA tools are always accurate.

 

You dont need Google nor do you need this article. This has all been done better for years using your server logs. Just ask your host provider for a download of your log files, get a free log analyzer, and all that data is there for free.

The problem with this “onclick” solution is its just more client-side scripting your customers have to run in their browser, slowing down your site and putting more dependence on JavaScript. 11% of user world-wide have some scripting turned off, so that would affectively make such tracking useless. Read the logs on your server. Its how most people track what people do in their site. They are quite rich as far as data, too.

 

Hey Patrick,

although it not being a definitive guide, you do got some great tips there.

Maybe you should add some tips upon analysing and interpreting the results - as many will only see numbers without meaning.

And that while there’s so much to gain from them.

-Dave

 

This is very useful *bookmarked*.

 

A very good information, I used to use statcounter but it got only 500 users limitation. I will try google analytics

 

Very valuable for some of my clients and yes if possible it would be great to see more tips of how to use google analytics as it can be one hard program to use.

Thanks

 

Do you have any idea why the volume of page views for a given page shown in the “content detail” report may be LOWER than the volume of page views for the same page but shown in the “Entrance Sources” report? I know this is just an issue of interpreting the report cirrectly but I can’t seem to get my head round it yet.

regards, Hugh

 

Thank you, thank you, thank you. I’m SO glad this post is at the top of the SERPS for related phrases.

 

Can you clarify exactly what % New Visits measures? Over what time frame is that percentage? I first assumed it was within the time frame set for the report: If looking at one week’s data, that would be the percent of new visitors in that week - with the inverse being the percentage of repeat visitors within the week.

If my % new visits number is 75%
In that week 75% of the audience is new and 25% came back more than once.

But the math doesn’t work if that’s the case. When I expand the range the % repeat visits should increase as a greater number of users could return within a wider range of time. 1 month should look something more like 60% new and 40% repeat (some don\’t repeat within a week but would within 2 or 4).

I’ve noticed though that the % new visits number stays exactly the same though regardless of the range. As though it is just reporting for today (or historically, that day). If so, what’s the range Google uses to determine if a visitor is repeat?

 

Paul, I think you are right, not sure why the maths doesn’t add up.

Try reading this post to see if it explains it a bit more.

 

Excellent article .. very useful

 

Your article post is very useful. Thank you very much.

Cheryl Fuerte   November 10, 2007 5:07 am | Reply

 

How do I add those quick links you see below your main search link on google.com? For instance, the About Us, Careers, etc.

 

Hi,
I’m having a blogger blospot blog. Can you please tell me how to track outgoing clicks and adsense earning for pages (if its possible) using GA?
Thanks

 
 

Is it possible to track other server errors like 500 errors that can occur sometimes on sites.

Can you build custom reports to filter out specific IPs and set up a report to look at data only from a specific ip.

 

I have always had Google analytics, but never tried this out before. Thanks!

-Tom
my website:

 

Thank you ! Thank you ! Thank you ! Thank you ! Thank you ! Thank you !

 

[…] more complex uses of Google Analytics I suggest you read Patrick Altoft’s guide to Advanced Analytics . Here he explains how to track exit clicks, downloads, sales and other valuable data. You can see […]

 

Thanks for all the great tips

I’ve just tried putting in the onClick=”javascript:urchinTracker (’/outgoing/alink’); and also have target=”_blank” in the href code and the target=”_blank” is not being applied. Any ideas for fixing this ?

Thanks

Jim   April 28, 2008 3:39 pm | Reply

Sounds like you have missed out a ” at the end of your onclick code.

Patrick Altoft   April 28, 2008 3:51 pm |

Patrick - I’d love to say you’re a genius - but that may be overstating it. Anyway it worked - always those simple things !!!
Thanks

 
Reply
 
 

[…] more complex uses of Google Analytics I suggest you read Patrick Altoft’s guide to Advanced Analytics . Here he explains how to track exit clicks, downloads, sales and other valuable data. You can see […]

 

Read our comment policy
We moderate first time commenters

Name (required)
E-mail (required - never shown publicly)
Your website
Your Comment (smaller size | larger size)