New and Improved GA.JS Documentation

December 13, 2007 by Justin Cutroni

Along with some other features, Google Analytics today launched Google Analytics Custom Tracking. This is a new website (code.google.com/apis/analytics/, a section of code.google.com) that deals with the Google Analytics Tracking Code. The site does a nice job of pulling together information about ga.js and Event Tracking. Plus it has a snazzy movie of Avinash, what a bonus!

While the new graphing features are nice, I think this is a very significant event. Google is really pushing Google Analytics and a data collection and analysis service, not just a web analytics tool. Sure, most of the data is generated via a web interface, but think of the proliferation of web-based applications and services.

Let’s not forget about Event Tracking. It’s not a rigid data structure that we have to adhere to. It is a flexible data model where we can define the data. It will work perfectly with web application.

I’d like to point out that the term API is all over this site. This has nothing to do with extracting data from Google Analytics. There is no API to extract data from Google Analytics.

Subscribe:

SiteScan for All!

October 23, 2007 by Justin Cutroni

SiteScan from EpikOne.Google got a lot of attention last week when it introduced some really cool new features in Google Analytics. One of these features, Event Tracking, is enabled by a new version of the Google Analytics Tracking Code (GATC).

This is a big change. Updating the GATC on our site can be a big project if you have a complicated implementation. If the GATC is not correct then tracking will cease and you’ll loose data. Migrating can be complicated because there are now two versions of the tracking code (urchin.js and ga.js) AND they’re incompatible.

Please note that the new tracking code has not officially been launched. It is currently in beta and should be out soon.

To help everyone transition from the old tracking code to the new tracking code some of the guys at EpikOne completely rebuilt SiteScan to support the new GATC.

For those of you that don’t know about SiteScan, it is a tool that scans the pages on your site for the GATC and insures that your installation is correct. The new version of SiteScan will parse your pages for the old tracking code (urchin.js) OR the new tracking code (ga.js). But here’s the best part…

SiteScan is Now Free!

That’s right, SiteScan is free… for everyone. So go on, give it a try. There is no reason not to.

Features

Besides being free, SiteScan has some other cool features.

The new SiteScan is smart enough to know what functions should, and should not, be used with each version of the tracking code. So, if you’re using ga.js SiteScan will know that you should NOT be using urchinTracker(). (If you have no idea what ga.js is check out this post).

Once SiteScan scans your site it spits out a CSV file listing all the pages scaned and any issues on each page. For those of you who used SiteScan in the past you know how hard it was to interpret the results. The new CSV file makes it extremely easy to find problems with your installation. Check out these sample results (right click and choose Save As).

The Brains and Brawn

A big congratulations to Alex and Casey who put a ton of work into SiteScan. Great job guys!

Subscribe:

Google Analytics Short Cut

September 13, 2007 by Justin Cutroni

As some of you may have noticed, my book PDF e-book has been published! Google Analytics Short Cut hit the web on August 31 and is now available for purchase at O’Reilly’s website.

In my opinion, and I’m a bit biased after writing for all those hours, it’s a pretty good deal for $10 US. Let me tell you why…

#1 Structured Information
There’s a lot of Google Analytics information out there. We have the GA group, blogs and some books. But, in my humble opinion, the one thing that is missing is a basic manual that provides a structured description of the system’s architecture and features. This was the real driving force behind the PDF. I wanted to explain how things work so users understand the results of certain configurations.

I didn’t want to create a web analytics book. Some pretty smart people have already written wonderful books that discuss web analytics. I wanted to create a work that can help people implement different web analytics strategies using Google Analytics and I think I did that.

#2 Free Updates
O’Reilly provides free downloads of updated PDF documents that you have purchased. How cool is that! We’ve seen Google make some pretty interesting changes to the product in the last 6 months. In fact, they just updates how time-on-site is calculated yesterday. I intend to update the PDF twice a year to cover any new features or major modifications. I might update it more if Google rolls out major changes.

But there’s a caveat… O’Reilly will only update the PDF if sales are good. You know where I’m going with this one. :)

If you’re interested in learning more about GA Short Cut please visit gashortcut.com and please make sure you read the acknowledgments. If you’d like to hear what others are saying you can read the reviews on O’Reilly’s site or check the reviews on gahortcut.com (If you’re interested in writing a review please let me know. I would be honored.)

Finally, I’d like to thank all of you. Thank you for sharing your thoughts, questions and ideas with me. Thanks for adding to the discussion and helping me grow and learn. I had no idea that blogging would lead to so many opportunities. But, more importantly, I had no idea it would lead to so many new friends.

Subscribe:

Introducing SiteScan

May 25, 2007 by Justin Cutroni

SiteScan!We all know that getting Google Analytics configured correctly is the key to getting good data for analysis. To help facilitate that process EpikOne has created a new tool called SiteScan. Originally we wanted a tool that would scan all pages and check for the tracking code. Believe it or not, missing tracking code is an issue. Even for enterprise clients. But I digress…

SiteScan is a GA diagnostic tool that scans your website for installation issues. Not only will it identify pages that are not tagged, it will also look for other configuration pitfalls. All you need to do is enter a website URL and SiteScan will crawl the site. When it’s done you’ll get a nifty report with the results.

SiteScan report

When you sign up for SiteScan you can re-scan your site 5 times. So, if SiteScan finds any issues you can fix them and then re-scan the site to make sure all the issues are resolved.

A big congratulations to Alex and Casey who worked very hard on this. Great job guys.

Subscribe:

EpikOne Google Analytics Setup Guide

April 10, 2007 by Justin Cutroni

E1 GA Setup GuideThis blog is almost one year old. In all that time I’ve tried to do two things: 1. create truly original blog posts, and 2. avoid hard selling you, the reader, on EpikOne. Heck, I haven’t even tried to soft sell you anything! Today that changes a bit.

I’d like to talk about something that my co-workers have worked very hard on; the Google Analytics Setup Guide. This PDF is a cohesive guide for installing Google Analytics on a simple website. We feel that one of the biggest obstacles to getting GA setup is figuring out where to start. We’ve tried to simplify the process by only addressing baisc implementations and I think that makes this guide very valuable.

If your site has 5 different sub-domains and uses a third party shopping cart then this guide is probably not for you. But, if you have a fairly basic website, and don’t know where to start, check out the setup guide.

Finally, a hardy well done to Paul, Charles, Melissa and all the others that worked so very hard on this.

Subscribe:

Tracking Clicks with GA Pt. 3: Advanced Implementation

April 9, 2007 by Justin Cutroni

Welcome to Part 3 of Tracking Clicks with Google Analytics! Last time I discussed the process and theory behind tracking visitor click data in GA. This technique is primarily used to track non-HTML files and outbound links. In this post we’ll discuss a quicker, easier way to implement the click tracking. Please make sure you’ve read Part 2 before reading this post.

Overview

Whenever we need to track clicks we use the following JavaScript code. This code automatically adds the urchinTracker function to appropriate part of your HTML at the appropriate time. With this script there is no need to change the HTML in your pages. You simple add this script to all the pages on your site and it does all the work for you.

You’re probably wondering how this all woks. I’m not going to get into the nuts and bolts, but this uses the DOM or Document Object Model. Using the DOM in the code gives us the ability to modify the HTML in real time.

About the Script

This script will only track clicks on anchor tags. It will not track clicks on images or other HTML elements.

If the anchor tag points to a different domain then urchinTracker() is executed before the visitor leaves the site and a pageview named ‘/outbound/<url>’ is created in Google Analytics. The <url> part is replaced with the value from the HREF attribute in the anchor tag.

If the anchor tag points to a non-HTML file then the scrip creates a pageview named ‘<path>’ where <path> is the value in the HREF attribute of the link.

Here’s an example of the script in action. The link below will take you to a test page where you can click on links to other domains and files Rather than send the data to GA, the script has been modified to display a message (note: a new window or tab will open in you browser).

GA Click Tracker Test Page

To view the code just look at the source of the above page. Right click on the page and choose ‘View Source’.

Installing the Script

Installing this script is simple. Copy and paste the code from the test page and place it in your web page. I place it before the closing BODY tag. After the script has been installed you can configure it to work with your site. Also, make sure that the Google Analytics tracking code is installed on the page.

Customizing the Script

There are a few customizations you can make to the code.

First, there is a variable named debug. When it is set to 1 the script will display a pop up window when a link is clicked. Set debug to 0 to disable the pop up. By default, debug is set to 1 (on).

Next, you can define the types of non-HTML files that this script will track. Find the variable named fileTypes. The value should look like this:

(".doc",".xls",".exe",".zip",".pdf")

To track additional file types just add the extension to the list. Make sure you match the text-formatting of the existing list.

Finally, you can change the way external links appear in the GA reports. By default, all external links will be preceded by ‘/outbound/’. If you would like them to appear differently change the extIdentifier variable.

Summary

There are lots of scripts like this. This is just our version. I hope it gives you some idea of what is possible and inspires you to create one of your own or modify ours. Just remember that this script will create additional data in your GA profiles. You many need to add a filter to deal with the extra data.

Please feel free to use and modify this script. The only thing we ask is you share the changes with others.

Subscribe:

Regular Expression Testing Tool

December 6, 2006 by Justin Cutroni


Over the past few months, Robbin Steif from LunaMetrics has been writing a series of posts about regular expressions. The series is amazing and I highly recommend it to anyone learning reg ex (as the geeks call it).

In one of Robbin’s posts she mentions a small, reg ex testing tool that we have on the EpikOne website. This tool was created by Alex, one of the founders of EpikOne. It is easy to access, easy to use and incredibly helpful. I’ve decided to repost the tool here to increase it’s visibility.

Regular Expression Testing Tool
Target String:
Regular Expression:
Result:
How to use it
  1. Enter the text that you want to apply the regular expression to in the ‘Target String’ field
  2. Enter your regular expression in the ‘Regular Expression’ field
  3. Click the ‘Submit’ button
How to interpret the results
  • If the regular expression matches any part of the target string then the ‘Result’ field will contain the word ‘Match:‘ followed by the part of the target string that was matched by the regular expression.
  • If the regular expression does not match any part of the target string then you will see ‘No Match‘ in the result field.
  • If you use parenthesis in your regular expression to capture part of the target string, then the tool will return the data stored in the parenthesis. The result field will contain both the part of the string that was matched AND the values in the parenthesis. First, you will see the term ‘Match:‘ followed by the part of the string that was matched. Then you will see the value stored in each set of parenthesis. Here’s an example.
Match: [matched part of string], [parenthesis value 1], [parenthesis value 2], [parenthesis value X]
Subscribe:

Google Analytics Campaign Tracking Pt. 2: The EpikOne Link Tagging Tool

November 10, 2006 by Justin Cutroni

In Part 1 of this series I explained that Google Analytics campaign tracking is based on a technology called link tagging. Link tagging is the process of adding business information to the URLs that we use in our on-line ads. But how do we actually tag these links? Some marketing campaigns can have hundreds, or thousands, of destination URLs. Google has provided a tool for us called the URL Builder. It’s great if you only have one or two links to tag, but it can’t handle hundreds of links.

To manage our link tagging effort we’ve created a tool in Google Spreadsheets that automatically generates tagged destination URLs. All you need to do is fill in the values for the Google Analytics tracking variables and a built in formula does the rest. Here’s a link to the file. Please help yourself :)

http://spreadsheets.google.com/ccc?key=p7c_HKcmspSUfEYSO0gskKw&hl=en

EpikOne Link Tagging Tool

How to Use The Tool

1. Click on the above link to open the Google Spreadsheet. Once open, use the menu in the top left corner (File > Export >xls) to export the file to your hard drive.

2. Once you have the file on your machine, open it using MS Excel.

3. Delete all the demo data in the file EXCEPT the equation in cell G8. Cell G8 contains the equation that does all the work.

4. Enter your campaign information into the corresponding columns. Enter a dash (-) for all variables that you are not using. You should always use the campaign, medium and source variables.

5. Add the destination URL to the destination URL cell. Don’t worry if your destination URL already contains query string variables, the tool is smart enough to handle them.

6. Cell G8 will automatically build your destination URL.

7. Continue entering your campaign data in new rows.

8. Copy the formula in cell G8 to other rows. The tagged destination URL will be created automatically.

After you have your destination URLs you can paste them into your on-line ads.

Let me know if you find this tool useful or a complete pain in the as*. Got a better tool and feel like sharing? Post a comment below!

*** Note: EpikOne assumes no liability for those that choose to use this file. ***

Subscribe: