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

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:

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.

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.

(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'); ">
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. Thanks to SEO specialist Dave for giving me the screenshots for this section.
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.

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

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
.
You can get our blog posts delivered for free by email every day - simply add your email address to the box below or alternatively grab the RSS feed.







{ 117 comments… read them below or add one }
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.
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
Nice one
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.
Patrick
great article!!
This is definitely useful. Awesome
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!
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?
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.
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 !
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
Find me on Twitter
Sounds like you have missed out a ” at the end of your onclick code.
More comments from Patrick AltoftPatrick – I’d love to say you’re a genius – but that may be overstating it. Anyway it worked – always those simple things !!!
Thanks
Hello
my website is listed top in google. what is the problem can u guide me. people visit website but they stay for few second and then left. why is so.
help me if you can.
thanks
Amit
I’ve always steered clear of Google Analytics because I don’t like the idea of Google knowing so much. eg if they knew how high a proportion of my visitors come from google itself, then they might downgrade the site.
Do you think this is a valid concern?
i have never used this product before. This is a good post in learning how to get into the game.
Good info, but how to track every outgoing click and not to mess placing the code in every link? Is it possible to install major GA code that registers every possible outgoing click?
Thanks for a very educational post. I use Google Analytics and didn’t realize this stuff was available.
Hi,
Great post. Can anyone help with the following. We use a generic keyword as well as numerous specific ones and want to track which product our customer actually buys. This will show up in Conversions and Revenue but we understand from GA that they can only show a total figure for Revenue. We need to know the specific amount for each transaction and product the customer buys.Any suggestions?
Very useful. We use Google Analytics, as one of the visitor tracking tools. This information gave in depth information, especially about tracking Sales. Thank you so much.
Quick question.
I’m using google analytics to track a certain page view. here’s my problem.
under content details. the number of page views show 7323
Under entrance source. the page views shows 14,030
The difference is so big, is just below 50% difference.
what do you think is the problem or am I just reading this wrong?
your answer is greatly appreciated
Tony
Find me on Twitter
Tony, I suspect you might be reading it wrong. Can you put a screenshot somewhere?
More comments from Patrick AltoftHi Patrick
Please follow the link to see the images.
http://www.imageox.com/share/334241-Chivas1.jpeg
http://www.imageox.com/share/334242-Chivas2.jpeg
Thanks
Tony
Find me on Twitter
I’m not sure to be honest, I see a discrepancy for my stats on my homepage as well.
More comments from Patrick AltoftWell, Thanks for the look.
I guess google has a lot of explaining to do.
Cheers!
I’ve tried the onClick method to track outgoing (and internal) clicks, but ran into two problems:
1) Google and other moronic bots will try to crawl these “virtual” pages and fill up your error logs and webmaster tools with loads of 404’s. I’m not sure how to get around this.
2) Your page views will double overnight, messing up all your stats. Although this can be fixed by creating a separate “click tracking” account.
Hope this helps someone.
Hi John,
Here’s the answer I got from Google regarding the dramatic difference in page views between content details and entrance source.
Google:
Under content details. The number of page views shows7323
Under entrance source. The page views shows 14,030
content details: refers to how many PVs on certain webpage (URL)
entrance source: refers to how many PVs brought by search engines to certain webpages. (also including layers pages not a single URL as content details)
Example: http://www.intel.com
Content details : only count visitors to http://www.intel.com (only one landing page)
entrance source: count visitors to http://www.intel.com as well as layers pages (click ad. button on http://www.intel.com will lead you a new landing page, pageview on this landing page is also counted)
So PV under content details is lower than PV under entrance source.
Hope this helps someone
hi! is there any danger in using analytics… i mean i contract google says things… like they can debit my card… and they can change the service fee without inform me…
or thats for adworks???
wish my earning figures were that good..
So, I took my google javascript out of my footer.php (in my theme). Verified that the script was gone from an actual page. Then, updated my “analytics user account” on the wp / google analytics screen.
I don’t get the javascript in my page. Is there some tag that is required? could my theme be missing something?
hi
thats great
tnx
Hi,
Just one specific question. One of my client ask me that is there any way google analytics track user groups information. Basically, i am building one secure site for them and when user log-in and browse something then in GA is there any way we can track from which user groups these users are.
Please let me know.
Hi ,
I also wrote an article about Google Analytics tips. It’s called Google Analytics Tips and Tricks. Please, take a look.
This is very nice Article
My search ends here.I was searching exactly this.How to use google to track salse, watch performance.
Thanks.
Thank you for this great information.Keep on writing..
Google Analytics is a great platform for checking how well your website is performing. Checking both the bounce rate, traffic and page views, this tool has certainly helped a variety of businesses to monitor how well they’re doing on the internet. As a designer myself, I have used this tool frequently and find it to be very informative and useful when monitoring our client’s sites. To start a website design, develop it and optimise can be very rewarding but to find out that a site’s stats have increased on analytics is the icing on the cake.
thanks
great information
Thanks..its really very helpful and perfect tips on google analytic.
Thanks for this wonderful article. Google Analytics have definitely come a long way from it’s beginnings as Urchin.
Thanks, I was struggling with reports for my rss feeds. Your article helped me.
Mmm, nice account. I notice that I was not the only one who found Google analytics user unfriendly, it took me a while to suss it out too.
Monker
Link Building Specialists
Your post is unique and informative.
But it’s seem to be hard to track revenue
Find me on Twitter
Nice Article, it is really helpful for the people who are making future in SEO field….Thanks!!!
More comments from SujitFind me on Twitter
I found this very useful thankyou but on some pages of my site I am trying to track clicks on affiliate links to products that are coded as iframes and scripts rather than as hrefs. How would I integrate this theory in those circumstances? I am in now way a techie so please made it idiot proof!
More comments from ChloeAliceWilsonThanks
Chloe
Find me on Twitter
Try using the onclick event.
More comments from Patrick Altoftvery informative article….
Find me on Twitter
Very cool post, thank you Patric. I’d love to have more references to Google Analytics tutorials. Even not specific how-to’s but more like conceptual best practices.
More comments from JuliaFind me on Twitter
Thanks for the tips and sharing them it was pleasure reading the tips as google analytics always prove to be of some help.
Thanks
More comments from neotericukDoes anyone know if wordpress timezone settings have any effect on the way google ranks you or how they rank you in their business listings?
More comments from webdesign2099I got a critical error when i tried to submit my last comment and then it wouldnt let me submit agian said i had already submitted it but i dont see it here naywhere. May want to look into that.
More comments from webdesign2099It did it agian this is what it is saying when I submit my comment Fatal error: Class ‘W3_PgCache’ not found in /nfs/c01/h04/mnt/44873/domains/blogstorm.co.uk/html/wp-content/plugins/w3-total-cache/lib/W3/Plugin/PgCache.php on line 191
More comments from webdesign2099Find me on Twitter
OK fixed – it was a new plugin I was testing.
More comments from Patrick Altoftthank you for this informative article, helps me to understand better
Thanks a lot for this, didn’t know that this can be done with google analytics. Bookmarked.
A few things i did’nt know there. Great informative article. Let me know if you add anymore google articles regarding seo and analytics!
Cetainly picked up some interesting stuff. Always find ecommerce tracking a real pain especially via third party payment portals.
Great post!
I will add tracking of 404 errors right now.
Polly
Thanks for very useful posting!
Great article, it would be great if there was of displaying a sales funnel in google analytics to show the transition from leads to sales.
Thanks for the article. GA is vital to a websites success. So was nice to have a read and see recommendations.
it seems to be hard to track revenue ..
Hey Patrick,
i am a new one in this field i m a non IT background person but interested in this SEO field and i m learning more and more about seo i just wann know that some one ask you to do my website seo then what to do first? and if possible please let me know how to boost a website. hope u dont mond for this request waiting for your reply….
regards RITA.
hope you do not mind*
Thank you very much for this useful tips.
Bookmarked.
Great stuff. Always knew this sort of stuff was in there, but was unsure on how to make it work. Great post. Thanks.
This is a pretty handy tutorial, Patrick. I've been having quite a confusing time in using GA, but seriously this cleared up a lot of issues for me.
Thanks for helpful tips due.. I am also using google analytics ( visitor tracking tool ) , Is it possible to track server errors …..
very exciting to find great information like this thank you very much for sharing
{ 22 trackbacks }
Leave a Comment (registration is optional)