Google Analytics Tutorial Part 2

  • 0
  • June 12, 2007

The Advanced Google Analytics Tutorial raised more questions than it answered so I have spent this afternoon going through everybody’s comments and trying to answer them.

If you have any more questions please feel free to ask in the comments at the end of this post.

Google has just announced a few new features including the ability (finally) to click on referring url’s and be taken to the referring page.

Michael asked:

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.

Click on Content > Top Content and then scroll right down to the form that says Find url and type the page you want to view the stats for. In this case I wanted to view stats for users clicking on my outgoing (affiliate) links.

Find url

From the chart below we can see that the link outgoing/top (named because it was at the top of the page) has had 1060 clicks in the time period selected.

The outgoing/top link had 1060 clicks

If you look to the top right of the screen you should see a drop down box containing a data range.

Drop down data range box

Click on the box and enter your desired date ranges in the boxes (hint: click on the box and then the name of the month at the top of the calendar to highlight the whole month) and then click the “Apply Range” button.

Drop down date range box

The result should be a graph comparing data from the two date ranges, one range has a blue line and one is shown with a green line.

Date range box

Hunter asked:

How do we track flash movie plays with google analytics?

Tracking Flash events is the same as tracking JavaScript events, just call the urchinTracker function:


Example Flash Code

on (release) {

// Track with no action



on (release) _

//Track with action



myVar = “Flash Track Test”

onClipEvent (enterFrame) {



More details

LGR asked:

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.

Motorcycle Guy asked :

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

I don’t think there is an easy way to do this. The best way would be to make your site database driven and append some automatic variables to the events you want to track.

Another solution would be to give each of your links an id parameter and then to track clicks on each id and register the event that way.

If anybody has any better suggestions please post in the comments.

f4rrest commented:

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

Clicking on Visitors > Map Overlay and then the Country detail level and finally selecting the graph view I was able to create the chart below. Is this what you were looking for? I suspect you wanted to see how traffic from a certain country changed over time but this isn’t possible unfortunately.

Traffic by country

Slides asked:

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

I don’t think GA is the right solution to track individual user sessions and activity on a website. Depending on the data you want to track it sounds like a php application would be best.

darnit commented:

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

Clicking on Traffic Sources > Referring Sites and then clicking on (or any of the other sites on the list) you can see a list of the referring pages as well as build a pie chart to visualise the data. Click the “Views” icons to view the pie chart.

Referring pages

This method falls down on sites where the referring page is as Google strips the id parameter off. It works fine for most blogs as they tend to use a folder structure rather than dynamic urls.

Any more questions feel free to ask below. Big Grin

thanks to SEO agencies and digital agencies for the help on this.

Patrick Altoft

About Patrick Altoft

Patrick is the Director of Strategy at Branded3 and has spent the last 11 years working on the SEO strategies of some of the UK's largest brands. Patrick’s SEO knowledge and experience is highly regarded by many, and he’s regularly invited to speak at the world’s biggest search conferences and events.

  • Stephen Mudra

    Thanks for the analytics information,

    I found using the javascript function

    _uacct = false;
    function eurl( code ) {
    if( _uacct ) {

    then adding
    onclick=”eurl(‘outgoingsitename’)” a cleaner option. It also allowed the analytics code to remain at the bottom of the page, so page load time should remain unaffected.

  • Matt Keegan

    I am just now sinking my teeth into the new version of Google Analytics. I like its ease of use and having access to vital statistics with just a couple of clicks of my mouse.

  • Matt Jones

    Could you go into the e-mail tracking feature?? I know about the URL maker but how do you set goals for these campaigns and view results.

    That would be very useful, thanks

  • steveg

    >MotorcycleGuy wanted to automatically add javascript to out going links.
    This could be done using a HttpFilter in ASP.Net reasonably easily (see Not sure about any other platform.

    >Slides wanted to track Registered users.
    Yes, this is doable, but would require a bit of fiddling around (eg you’ll have to read the Google Analytics Help and work out the nitty gritty). I’d try something like this:

    First create a new Profile called “Registered Users”

    Second alter your pages so Registered users have pages containing Javascript that outputs custom Campaign variables (see Google Analytics Help How Do I Tag My Links and Tool: URL Builder). For instance you might set Campaign Source to “Registered” and Campaign Medium to “Web”

    Next create a Custom Filter that Includes everything with a Campaign Source of “Registered”. Apply the filter to Only your Registered profile.

    (I’d also create an Unregistered Profile with an Exclude filter. Giving you 3 Profiles “All”, “Registered”, “Unregistered”)

    And that should do it.

    Another alternative to the campaign tracking stuff would be if your registered users have something in the URL you can create a filter on:

  • Andrew

    Can anyone point me to clearly written instructions for how to get GA to track transactions through a third-party shopping cart? I have seen Google’s instructions at
    analytics/bin/ but they are not detailed enough to help me with our third-party cart, We transmit product and purchase information to the cart from our pages using a form that is sent when the customer clicks on the “Add to Cart” button and I have already added Google’s code,

    just above the urchinTracker code on all our pages, but GA still is not reporting any shopping cart data.
  • Max Cordy

    LGR ASKED: 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.

    ANSWER: The easiest way to do this is through DOM scripting. You can easily traverse the DOM and add an onClick event to each link. It would take about 3 lines of Javascript that would run when the page finishes loading.

  • Malcolm Sequeira

    In response to LGR and Motorcycle Guy:

    You can use something like this to traverse the current page and add a tracking function to the onClick event of your links. I have a different version of this running on my site.

  • svox

    You blog has absolutley great tips, thanks for the work.
    Getting down to the question – I tried to find out a geographical overlay of visitors coming from the particular reffering site but have not found such a filter. So it’s like having a new source of descent traffic I am couruios what sort of countries it supplies the visitors from. Would appreciate if you’ let me know if it’s feasible to get.

  • Julia


    Your tutorial is the best online resource about GA, including the help section of GA itself. Thank you so much for keeping it updated.

    I’d like to know whether GA can be used on intranet portals, and whether there are any constrains.

    Thanks in advance!

  • Pingback: 75 Ultimate Google Analytics — Tools, Tips & Tricks Resource()

  • Julia

    Very nice article, thank you! I enjoyed it months ago when you just published it, and I enjoyed it now again. I would really be happy if you found time and wrote an article about advanced segments.

  • Pingback: How to Getting the most out of Google Analytics — Quick Function()

  • Andy Kuiper

    A nice, well laid out article on tracking with GA – however since this article was first published, GA has introduced new versions of it’s code, so be sure to check on which version you have installed prior to making changes.

    *Would love to see you write a new “latest edition” article dealing with the new GA code: thanks so much Patrick :-)

  • Jane

    Thanks for this. I had heard about Google Analytics before but had never used it – but after reading this I had to. I was worried it would all be too confusing but it isn’t too bad, thanks to all your guidance. Keep up the good work!

Like what you see? Talk to an Expert