Google Analytics Launches new AdWords Reports & Other Goodies

Today at Emetrics, Brett Crosby announced a number of new features and recapped some recent changes to Google Analytics. Here’s a quick video recap of the announcement and some thoughts on the changes.

Specific things that Brett talked about:

The rebranding of Google Analytics consultants as Google Analytics authorized partners.

This was announced on the AdWords blog and on the Analytics blog. Google is unifying their partner programs. The GAAC is gone, now partners are Google Analytics Certified partners. This should help differentiate partner companies from individual passing the GAIQ exam.

The formal launch of the new Async tracking code.

It’s been out for a while but this was the official coming out for the new version of the tracking code. I wrote a about how the async code works and if you should switch. The async code will now be the default for tracking. Check out the blog post for more information about how it works.

The introduction of the Google Analytics Apps Gallery.

Google is creating a place to showcase apps built on the API. I’ve long felt that the marketplace can innovate more than any Analytics company. GA has more or less become a giant data collector. The gallery should help push more development of analytics tools.

The addition of the AdWords ID to the GA API.

It is now possible to pull actual ad and search query information via the API. This is huge, I think it’s going to lead to a lot of innovation in the search tool marketplace. Vendors like ClickEquations can now connect what happened on a visitors site directly back to the AdWords search query and ad variation. Pretty cool.

New AdWords reports.

Google also announced the addition of new AdWords reports to Google Analytics. I think we all agree that the previous reprots were less than good. The new reports offer additional data, like the actual search term, that was not previous available in Analytics.

Brett also spoke about the recently introduced AdWords Search Funnels. This is Google’s crack at AdWords campaign attribution. My buddy Nick dove a little deeper over on the WebShare blog.

While some might look at this list and shrug that there’s not much new I think these changes hint at things to come. Specifically I think the AdWords API announcement is huge. This tells us Google is pulling more and more data into Analytics. How long before we get DoubleClick data and other types of data in Analytics? Or when will they let us import data into Analytics, like cost data?

Overall, a nice little treat for us analytics users. Thanks to the Analytics team and great job.

As always, I welcome your comments!

Count Me Out: GA.JS Version

A while back I wrote a post called Count Me Out! that explained how to exclude Google Analytics data based on the custom segment value.

My previous post was based on the old, urchin.js tracking code, and a lot of people have been waiting for an update. It’s taken a while, but here it is.

I will mention that my favorite way to exclude traffic from Google Analytics is using an IP exclude filter. An IP based exclude filter is very accurate unless you having a changing IP. The method below works best if you have a dynamic or changing IP address.

Even if you’re not interested in this post, there is a fun ‘group activity’ below. Please try it!

The old version of this hack method required you to add a new page to your website. That page would set the GA custom segment cookie (named __utmv) on your computer.

This technique works fine, but who wants to add a new page to their site? It can be a pain.

I’ve simplified this technique by removing that page. You can enter the JavaScript directly into your browser.

Step 1: Set Custom Segment Cookie

Go to the site that you are tracking with Google Analytics and view a page.

Copy the code below and paste it into the location bar of your browser and click ‘enter’ on your keyboard.

You should see a message that says, “Custom segment has been set. Time to create a filter.”

Here’s a tip, you can bookmark this JS to make it easy to reset the cookie in the future. I set the cookie every time I fire up my browser.

Step 2: Create Exclude Filter

Next, create an exclude filter in Google Analytics to exclude the user defined segment (i.e. the cookie) you just created:

This filter will exclude anyone with a custom segment cookie with a value of ‘remove-me’.

Remember, cookies are specific to a browser and computer. If you use mulitple browsers or multiple computers you need to set the cookie using all the browsers on all the computers you use.

Having Some Fun With This!

You’ve probbaly figured out that you can set the custom segment cookie on anyone’s website as long as they’re using GA. This means that you can add data to their User Defined report. Let’s try this on my site!

Navigate to www.cutroni.com/blog and place the following code in the location bar of your browser after the page has loaded. Change FOO to whatever you want and press enter on your keyword. That’s it. You’re now in my data.

I’ll post some of the more popular and creative values in Twitter and maybe here at a later date.

Please try to keep it clean. I often review data with my 4 year old son :)

Thoughts on the Old Method

The old version of this technique uses a form to set the custom segment cookie which is pretty handy if you have a lot of people in remote locations that need to be excluded from the data. Just send all your coworkers, contractors, etc. a link to the page and ask them to set the cookie on their computer. It’s a little easier than asking them to paste JS into their browser.

If you’re interested in using this technique here is a new version of the page and the process.

Step 1: Create a new page on your site using the code below.

** Note ** The information below is in an iFrame. If you receive this post via email you may not see the contents.

Step 2: Go to the new page you just added, fill out the form, and click the ‘Create Cookie’ button. Keep track of the value you enter into the form, you need it for step 3.

Step 3: Finally, create an exclude filter in Google Analytics to exclude the value that you entered into the form. Remember, you need to use a regular expression for the filter field. So if you entered ‘remove-me’ in the form, enter ‘remove-me’ as the Filter Field.

That’s it. Sorry for the lame post, but I’m trying to update a lot of the old code and posts on the site.

Google Analytics E-Commerce Tracking Pt. 3: Why EVERYONE Should Use It

Google Analytics Visits to Purchase and Time to Purchase reportsThe Google Analytics e-commerce reports contain two specific reports that I believe are critical to understanding the behavior of site visitors: Days to Purchase and Visits to Purchase. These reports are the only way to measure the online sales cycle using Google Analytics.

But, as their names imply, these reports are focused on commerce. But not all websites are commerce based. What if we have a lead gen website? We want to measure how long it takes to get a lead, not make a purchase.

Herein lies the problem: there is no “time to conversion” or “visits to conversion” report in Google Analytics.

To get around this little issue EVERYONE should use GA e-commerce tracking to measure conversions, regardless of site purpose.

The Reports

Before I talk about how to set up e-commerce tracking for a non-commerce site let’s discuss the Visits to Purchase and Time to Purchase reports and how they can be used. Remember, in this application of e-commerce tracking “purchases” are really just conversions.

Here’s the first report we want to use, the Visits to Purchase report.

Google Analytics Visits to Purchase Report

The Visits to Purchase report shows how many visits a visitor generated before they converted. The chart above shows that most visitors convert on the first visit. This is good. It means that visitors come to the site, find what they need and convert. This can also be very bad, it means that we have one chance to get someone to convert. If they do not convert on the first visit then we may not get another chance.

Let’s pair this data with the Time to Purchase report to better understand how much time passes between a visitor’s initial visit and their “conversion” visit.

Google Analytics Days to Purchase report

The data indicates that everyone converts on Day 0, or the current day. This makes sense since most everyone converts on their first visit.

But what if most conversion occurred on the second visit? If conversions happen on the second visit, but still on Day 0, it means that visitors are probably doing some research prior to conversion and are checking another site on the same day before returning to our site to convert.

Knowing how many visits to a site it takes to convert a visitor is very actionable. What if the data indicates that visitors convert after the third visit? This means that we need to get a visitor back the site a third time to have any chance for a conversion. We may change our keyword bidding strategy to target visitors that are further along in the conversion cycle or we might try to collect an email address to send them additional information via email.

The key concept is that this data explains how many times we need to get the visitor to return to the site in order to generate a conversion.

If we do not using the e-commerce code to track “conversions” then we do not have access to this information.

One More Reason to use E-Commerce

There is one other reason why I like to use e-commerce tracking to track conversions. Google Analytics will only track one conversion per visit. If a visitor converts multiple time at the same goal Google Analytics will only count one conversion.

However, GA will track multiple purchases per visit. Is this a big deal? Not really. But if you want to make the data as accurate as possible, and have a goal that can be achieved multiple times per visit, then try using a transaction to track it.

Plus, using e-commerce to track conversions adds an extra “goal” to each profile, bringing the total to 5. Woo hoo!

Installation & Setup

There are three basic steps necessary to use the e-commerce tracking code on a non e-commerce site. While the steps are similar to those described in my previous post on installation there is one big difference. Let’s walk through each step.

Step 1: Activate the Reports

The first step in setting up GA e-commerce tracking is enabling the e-commerce reports. Log into GA and edit the profile settings. Specify that your site is an e-commerce site. This enables the e-commerce reports.

Google Analytics E-Commerce Reports

Remember, the e-commerce reports is a profile setting that is “off” by default. You’ll need to activate the reports for each new profile you create.

Step 2: Tag your Receipt Page

I know this seems like a silly step, but make sure you add the GA tracking code you your receipt page. You must have the standard GA tracking code on your receipt page in order to track purchases.

Step 3: Install the Code

This is where the installation differs from the standard installation. To measure purchases with Google Analytics you need to add the following code to your thank you page. The code does not need to be modified in any way.

<script type="text/javascript">
   var gaJsHost = (("https:" == document.location.protocol) ?
"https://ssl." : "http://www.");
   document.write("<script src='" + gaJsHost +
"google-analytics.com/ga.js' type='text/javascript'>" +
"</sc" + "ript>");
</script>

<script type='text/javascript'>
var pageTracker = _gat._getTracker("UA-XXXXX-1");
pageTracker._setLocalRemoteServerMode();
pageTracker._initData();
pageTracker._trackPageview();

// Some simple code to create a fake order ID
var timeObj        = new Date;
var unixTimeMs   = timeObj.getTime();
var unixTime      = parseInt(unixTimeMs / 1000);
var orderID        = pageTracker._visitCode() + '-' + unixTime;

pageTracker._addTrans(
      orderID, // required
      "",
      "",
      "",
      "",
      "",
      "",
      ""
);

pageTracker._addItem(
      orderID, // required
      "",
      "",
      "",
      "1",  // required
      "1"   //required
);

pageTracker._trackTrans();
</script>

You’ll notice that I added the e-commerce code to the regular GA page tag, but you can add it anywhere on the page. I just like keeping things together, it seems more organized to me.

You’ll also notice there is a lot of missing information in the above code. I’ve added the bare minimum for the tracking to still work. Don’t worry about the missing data, GA will still track a transaction, i.e. a conversion, and we will be able to use the Visits to Purchase and Time to Purchase reports.

That’s it. Once the code has been added you’ll start to see some data in your Visits to Purchase and Days to Purchase reports.

Got an interesting story to share about your e-commerce implementation? I would love to hear about it below in a comment.

Remember, this is part 3 in a multi-part series on e-commerce tracking. You may be interested in parts 1, 2 and 4:

Google Analytics E-Commerce Tracking Pt. 1: How It Works
Google Analytics E-Commerce Tracking Pt. 2: Installation & Setup
Google Analytics E-Commerce Tracking Pt. 4: Tracking Lead Gen Forms

Tracking Sub Domains with Google Analytics

Tracking websites that have multiple sub domains may not seem like a complicated thing. In fact, the GA support docs clearly outlines two ways to track sub domains. You can track all sub domains in a single profile or you can track sub domains in separate profiles.

But what if you want more flexibility? What if you want to track one group of sub domains in one profile and a different group of sub domains in another profile? Or what if you want to create new profiles for a different groups of sub domains in the future?

I like to use an approach that let’s you decide how you want to group sub domain traffic. This setup will give you the most flexibility now and in the future. Some of the benefits include:

1. It let’s you collect all data in a master profile. This facilitates ‘roll up’ reporting and gives you an easy way to measure traffic to the primary domain and all of the sub domains.

2. This technique lets you track each individual sub domain in it’s own profile which is useful for deeper analysis.

3. You can easily create new profiles in the future based on groups of sub domains.

Here’s the exact process to get this working.

1. Create Profile for The Primary Domain

The first step is to create a master profile. All other profiles for the website, including profiles for the various sub domains, will be based on this profile. When you enter the domain for the website use the primary website domain. In the example below, I’m using www.sitedomain.com as the website domain.

Google Analytics Master Profile Settings.

After creating the profile GA will display the tracking code for the site. Before you add it to your pages it must be modified. You need to force GA to use the primary website domain for the cookie domain. This modification will let you track each unique visitor across all sub domains. This in turn let’s us collect all site data in a single profile and do ‘roll up’ reporting.

Old urchin.js tracking code:

<script type="text/javascript">
_uacct = "UA-XXXXXXX-1";
_udn = "sitedomain.com";
urchinTracker();
</script>

New ga.js tracking code:


<script type="text/javascript">
   var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
   document.write("<script src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'>" + "</sc" + "ript>");
</script>

<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-XXXXXX-1");
pageTracker._setDomainName("sitedomain.com");
pageTracker._initData();
pageTracker._trackPageview();
</script>

Use this profile as a way to measure overall traffic across all of your sub domains. To facilitate page analysis in this profile add a filter that concatenates the hostname to the Request URI, which is the piece of data in the Top Content report. This will help you differentiate traffic to pages with the same URI that may reside on different sub domains.

20071118-hostname-request.png

A handy report that you’ll want to use in this profile is the Visitors > Network Properties > Hostnames report. This report will show traffic to the primary domain and all of the sub domains. It’s an easy way to compare traffic to the various sub domains.

2. Create Profiles for All Sub Domains

Once you have created the master profile you can start creating profiles for each of the sub domains. Remember, each sub domain profile is based on the master profile, that we created in step 1. Here’s how to set up the new profile:

20071118-sub-profile.png

Now that you’ve created the profile, make sure you add the tracking code to the pages on the sub domain. The tracking code for the sub domain is the same as the tracking code that goes on the primary domain (it’s the code from step 1).

3. Add Filters to Sub Domain Profiles

The next step is to add a filter to the sub domain profile so it only contains data for the appropriate sub domain. This is done using an include filter based on the hostname. Once this filter is in place you’ll have the master profile which will contain data for all sub domains, and this profile that will contain data for a specific sub domain.

Filter to create a GA sub domain profile

To create additional profiles for other domains just repeat steps 2 and 3. Obviously the settings for the filter used in step 3 will depend on the sub domain that you want to include in the profile.

Creating Additional Profiles

Let’s say you need to create a profile for two sub domains: 1.website.com and 2.website.com. This can easily be done because the same tracking code is on both sites. All you need to do is add an include filter with the following settings:

GA Filter settings for 2 sub domains.

While Google’s documentation describes a good way to track sub domains, I think this approach is better due to it’s flexibility. Plus, because the same tracking code is used all all sub domains you don’t need to worry about placing the wrong tracking code on a sub domain.

Good luck with your setup!

Tracking Clicks with GA Pt. 3: Advanced Implementation

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).

And here is the source code for the above page:

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.

Tracking Clicks with GA Pt. 2: Basic Implementation

In Part 1 of this series I discussed urchinTracker: how it works and what it does. Today we’re going to put that knowledge to use and learn about tracking visitor clicks.

The concept behind tracking clicks with Google Analytics is simple. We capture the visitor’s click by modifying the page HTML and then send the click to Google Analytics in the form of a pageview. Because the click is stored as a pageview we can find the data in many Google Analytics reports.

Implementing click tracking is a two step process:

1. Capture the visitor’s click

2. Tell Google Analytics how to record the click

Here’s more detail about the process.

Basic Installation Process

1. Capture the Visitor’s Click

clickerhand.jpgWhen a visitor clicks on a web page, the web browser captures the click. When I say ‘captures’ I mean that the browser knows that the user performed a click and what they clicked on. We can tell the browser to take some type of action at the exact moment when the click occurs. Here’s an example. When you click on this link a pop up message will appear.

How does it work? I made a small change to the HTML that ‘told’ the browser to pay attention when you clicked on the link. The browser does not know to pay attention to the click unless you tell it to. Normally we don’t care about every single click, so we don’t tell the browser to pay attention.

Let’s look closely at another example, an image tag. Here’s a standard HTML image tag:

<img alt="My Image" src="/foo.jpg" />

Here is the same image tag that has been modified to capture a visitor’s click:

<img onclick="" alt="My Image" src="/foo.jpg" />

See the ‘onclick’ part of the image tag? It’s called an attribute and it’s the part that tells the browser to listen for the click. The onclick attribute can appear in almost any HTML tag. That means that we can capture the click when a visitor clicks on almost any part of your web page.

The onclick attribute is also the place where we specify what action we want the browser to take when the click happens.

2. Telling Google Analytics What Happened

Now we know how to to tell the browser to capture a click AND how to respond. What do we want to happen when the click occurs? We want to create a pageview in Google Analytics that identifies the visitor’s click. How do we create pageviews in Google Analytics? With urchinTracker :) See, it’s all coming together.

Let’s cut right to the chase. Here’s how to track a click on an image:

<img alt="My Image" onclick="javascript:urchinTracker('/clicks/images/foo.jpg');" src="/foo.jpg" />

We’ve added a ‘reaction’ (urchintTracker) to the onclick attribute. Here’s the entire process that follows a click on the above image tag:

  1. The browser captures the click
  2. The browser responds to the click by running (or executing) the urchinTracker function
  3. urchinTracker creates a pageview in Google Analytics named ‘/clicks/images/foo.jpg’

Don’t worry about the ‘javascript:’, that just tells the browser that the function is a JavaScript function.

The beauty of this system is that the onclick attribute exists for almost all HTML elements. This means you can apply the above example to almost any piece of HTML.

Implementation Examples

20030323-pdf-image.jpgThe most popular application is tracking clicks on links, also known as anchor tags. Why? Because anchor tags link to many objects that can not be tracked by Google Analytics. Two of the most common are non-HTML files (like PDF, MP3, etc) and links to other websites site (I call them outbound links). Here’s an example of tracking a link to another site:


href="http://lunametrics.blogspot.com">Robbin's Blog

When someone clicks on the above link, a pageview will be created in Google Analytics. The pageview will be named ‘/outbound/lunametrics.blogspot.com’.

And here’s an example of tracking a link to a non-HTML file:

onclick="javascript:urchinTracker('/files/pdf/trail-map.pdf');">trail map

This PDF will be tracked as a pageview named ‘/files/pdf/trail-map.pdf’.

One thing to note is how I am structuring the name of the pageview. For the outbound link I added ‘outbound’ to the pageview name. It’s a good idea to have some type of naming convention for your non-HTML files and outbound clicks. It will help if you need to create a filter or want to easily sort the data in GA.

You’ve probably realized there is a downside to this tracking method. What happens if you have a huge number of clicks that you want to track? For example, what if your website has 1000 PDF files and you don’t want to modify all of those links? I have a solution for this and will cover it in my next post.

A Note About Your Data

You’re probably wondering where all this click data is stored. Remember, we’re creating pageviews. So any GA report that shows pageviews will show the visitor clicks. Here’s an example, the top content report:

20070323-outbound-example.jpg

One thing to consider is how your profile data will change if you start tracking clicks with urchinTracker. urchinTracker creates pageviews, so the number of pageviews in your profile will increase. If you need an accurate number of true pageviews then make sure you use an exclude filter to massage the appropriate data.

Here’s how an exclude outbound clicks filter would look:

20070323-exclude-outbound-filter.jpg

So now you can see the importance of structuring the name of your pageview.

Final Thoughts
One thing I did not cover in this post is how to use urchinTracker to track non-HTML events. Certain technologies, like Flash, JavaScript and Ajax also create clicks but they can not be trackd in the manner described above. One does use urchinTracker to track these technologies, but the implementation is different.

Next up, I’ll talk about an advanced way to track visitor clicks.

Tracking Clicks with GA Pt. 1: About urchinTracker()

Welcome to Part 1 of How to Track User Clicks using Google Analytics. Before we learn how to track clicks we need to review some of the technology behind Google Analytics. In particular, we need to understand how GA creates pageviews. Why? Because we will use the same technology to track clicks. This post may seem off topic, but it lays the foundation for the next post in the series.

urchinTracker: A JavaScript Function

It all starts with the Google Analytics tracking code:

2007-03-16-tracking-code.jpg

I’d like to point out the second to last line. It contains a JavaScript function called urchinTracker. For those of you that don’t know what a function is, it’s a piece of code that actually ‘does stuff’.

There are two important features of a JavaScript function:

  1. It can appear almost anywhere in your web page. There are certain limitations, but in general you can move it around.
  2. It can appear more than once.

Applying these characteristics to urchinTracker means we can place urchinTracker almost anywhere in a web page AND we can include it multiple times, two important concepts.

urchinTracker: What it Does

We know that urchinTracker is a function and it ‘does stuff’, but what exactly does it do? While visitors engage with your website, urchinTracker is collecting information in the background. It identifies things like:

  • Where the visitor came from
  • How many times they’ve been to your site
  • What content they are viewing
  • Characteristics of their browsing environment (operating system, browser, etc.)
  • The title of the current website page
  • etc.

Please note that urchinTracker is not collecting any personally identifiable information. It is collecting generic information about the visitor.

After it collects the data, it sends it to Google Analytics in the form of a pageview. So every time urchinTracker runs, or as programmers say ‘executes’, it creates a pageview in Google Analytics. And, because urchinTracker is a function, we can add it to a web page multiple times. This means we can create multiple pageviews in Google Analytics every time a single page loads in the visitor’s browser.

‘Naming’ Pageviews with urchinTracker

Another important concept to understand is how urchinTracker ‘names’ pageviews. When I say ‘names’ a pageview, I mean the way that the pageview is represented in the GA reports. Let’s look at some pageviews in the Top Content report:

2007-03-18-top-content.jpg

Everything in the ‘Content’ column was created by urchinTracker. Here’s how:

  1. urchinTracker extracts the information from the location bar of your browser.
  2. It modifies the value to show only the name of the directories, file and query string variables.

Here’s an example. This URL:

20070315-location-bar.jpg

would appear in the top content report as this:

20070315-top-content-uri.jpg

That’s the default behavior of urchinTracker. Recapping what we’ve learned; whenever a page loads in your browser, urchinTracker collects all the necessary information, creates a pageview name from the location bar and sends the data off to Google Analytics in the form of a pageview.

Important Stuff Below, Pay Attention :)

What’s really cool is that we can over-ride the default behavior and tell urchinTracker how to name a pageview. For example, let’s say we want to change the way the pageview for ‘/index.php’ is named in GA. We would modify urchinTracker as follows:

urchinTracker('ski-bum');

This modification forces urchinTracker to name the pageview ‘ski-bum’ rather than ‘/index.php’. This means that when you view the Top Content report you’ll see ‘ski-bum’ and not ‘/index.php’. Whatever you place in the parenthesis of urchinTracker becomes the name of the pageview in Google Analytics.

Summary

There are a few important concepts to take away from this post:

  1. Google Analytics pageviews are created by a JavaScript function named urchinTracker
  2. urchinTracker can appear almost anywhere in a web page
  3. urchinTracker can appear multiple times in a web page
  4. By slightly modifying urchinTracker we can change the ‘name’ of pageviews in Google Analytics

In Part two of this series we’ll put our knowledge of urchinTracker to work and talk about tracking visitor clicks.