Google Analytics E-Commerce Tracking Pt. 2: Installation & Setup

January 22, 2008 by Justin Cutroni

This is part 2 in my series on Google Analytics e-commerce tracking. In part 1 I described, at a conceptual level, how GA e-commerce tracking works. In this post I’ll get into the specifics of the code and how to install it.

This isn’t the most exciting stuff (that will be part 3), but a correct setup leads to correct data. :)

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 activates the e-commerce reports.

Google Analytics E-Commerce Reports

There are other e-commerce settings that don’t get much use (unless you’re an international site). You can specify one of 25 different currencies (wow!) and the number of decimal places you would like displayed (1,2 or 3). Even if you use USD you can specify 3 decimal places. Go ahead and try it, it’s interesting.

Remember, 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 transactions. The reason is that the e-commerce tracking code is stored in the ga.js. If this file is not included on the receipt page then you can’t track transactions.

Step 3: Install the Code

This is the hard part: code construction. As we learned in part 1, GA uses a JavaScript collection technique to track e-commerce transactions. Your server code must inject transaction information into the GA JavaScript before sending the receipt page back to the browser. When the receipt page renders in the visitor’s browser the JavaScipt executes and sends the transaction info to GA.

Get ready for some construction.

Let’s take a look at the code:


<script type="text/javascript">
pageTracker._addTrans(
      "order-id", // required
      "affiliate or store name",
      "total",
      "tax",
      "shipping",
      "city",
      "state",
      "country"
); 

pageTracker._addItem(
      "order-id", // required
      "SKU",
      "product name",
      "product category",
      "unit price",  // required
      "quantity"  //required
); 

pageTracker._trackTrans();
</script>

The three parts of GA e-commerce trackingThe first thing that you’ll notice is that there are three distinct parts to the JavaScript. Each is a different method. The first section, identified by the _addTrans() method, creates the transaction and stores all the information about the transaction.

The second section, identified by the _addItem() method, is used to add an item to the transaction. You need to create an _addItem() section for each different item, or SKU, in the transaction. The order ID in the _addItem() method must be the same order ID used in the _addTrans() method. That’s how GA ties an item to a transactions.

The final section is the _trackTrans() method. This method actually sends the data to GA by requesting the __utm.gif file once for the transaction and once for each item in the transaction. So if you have 3 different SKUs in a transaction there will be 4 requests fot the __utm.gif.

The above JavaScript can appear anywhere on your receipt page. Just make sure that it appears after the main GA page tag. The reason is that the e-commerce code is part of the pageTracker object. If the pageTracker object has not been created then you can’t call the e-commerce methods.

Just to reiterate a point: you must create server side code that outputs the transaction data in the format above. If you do not have access to your shopping cart code, and your cart provider does not provide e-commerce tracking, then you may be out of luck.

Once the code has been installed you should begin to see e-commerce data in your reports.

Notes and Suggestions

Like many things in Google Analytics, there are some things that can trip you up:

  • If you do not wish to pass a certain piece of data to GA then do not add anything between the quotation marks. The only required fields are the order ID, the unit price of each item and the quantity of each item. Everything else is optional.
  • Do not use currency identifiers or commas (to separate thousands) in any of the numeric fields (i.e. total, tax, shipping). These characters have caused problems in the past.
  • Each piece of transaction data that you send to Google Analytics becomes a data element in GA, just like any other piece of data in GA (geo data, campaign data, browser data, etc.). You can do all sorts of neat things with filters and e-commerce data. More on this later.
  • The affiliate or store name field is no longer used in the GA reports. However, the data is still collected by GA so you can use it in a filter.
  • The transaction geographic data collected by GA is no longer used BUT it is collected. Google Analytics determines the location of the user, and thus their transaction, based on their IP address. The old version of the GA tracking code used the data specified in the transaction. Like the affiliate field, the data can be used in a filter.

Up Next

In the next post I’m going to talk about some creative ways to use e-commerce tracking. Specifically, why I believe that everyone should use e-commerce tracking on their website.


Share:
These icons link to social bookmarking sites where readers can share and discover new web pages.

  • Digg
  • Technorati
  • del.icio.us
  • Slashdot
  • StumbleUpon
  • Ma.gnolia
  • YahooMyWeb
  • co.mments
  • Reddit
Subscribe:

Google Analytics E-Commerce Tracking Pt. 1: How It Works

January 13, 2008 by Justin Cutroni

This post is the first in a series of e-commerce transaction tracking with Google Analytics. Why is e-commerce tracking important? Well, transaction data is a vital piece of information when analyzing online business performance.

Sure, it’s great to measure things like conversion rate, but revenue is much more tangible to many business owners. Having the e-commerce data in your web analytics application makes it easier to perform analysis. Do you need to set up e-commerce tracking? No, but it sure helps. :)

The Big Pictures

E-commerce tracking is based on the same principal as standard pageview tracking. JavaScript code sends the data to a Google Analytic servers by requesting an invisible gif file. The big difference is that e-commerce data is sent rather than pageview data.

But how does Google Analytics get the e-commerce data? That’s the tricky part. You, the site owner, must create some type of code that inserts the transaction data into the GA JavaScript. Sounds tricky, huh? Well, its not that bad.

Step by Step: How it Works

Let’s break it down and walk through what actually happens.

1. The visitor submits their transaction to your server.

2. Your server receives the transaction data and processes the transaction. This may include a number of steps at the server level, such as sending a confirmation email, checking a credit card number, etc.

3. After processing the transaction the server prepares to send the receipt page back to the visitor. While preparing the receipt page your server must extract some the transaction data and insert it into the Google Analytics JavaScript. This is the code that you must create.

4. The receipt page is sent to the visitor’s browser.

5. While the receipt page renders in the visitor’s browser the e-commerce data is sent to Google Analytics via special GA JavaScript.

Here’s a basic diagram of the process. Again, the biggest challenge during implementation is adding code to your web server that inserts the transaction data, in the appropriate format, into the receipt page. I’ll cover the setup in part 2 of this series.

What Data can be Tracked?

Google Analytics collect two types of e-commerce data: transaction data and item data. Transaction data describes the overall transaction (transaction ID, total sale, tax, shipping, etc.) while item data describes the items purchased in the transaction (sku, description, category, etc.). All of this data eventually ends up in GA reports. Here’s a complete list of the data:

Transaction Data

  • Transaction ID: your internal transaction ID [required]
  • Affiliate or store name
  • Total
  • Tax
  • Shipping
  • City
  • State or region
  • Country

Item Data

  • Transaction ID: same as in transaction data [required]
  • SKU
  • Product name
  • Product category or product variation
  • Unit price [required]
  • Quantity [required]

A few notes about the data. First, the geo-location data is no longer used by Google Analytics. The new version of GA tries to identify where the buyer is located using an IP address lookup. Also, you should avoid using any non-alpha numeric characters in the data. Especially in the numeric fields. Do not add a currency identifier (i.e. dollar sign) in the total, tax or shipping fields. this can cause problems with the data.

Coming Up Next

Next time, in part 2, we’ll look at the code and how to actually add it to your site.


Share:
These icons link to social bookmarking sites where readers can share and discover new web pages.

  • Digg
  • Technorati
  • del.icio.us
  • Slashdot
  • StumbleUpon
  • Ma.gnolia
  • YahooMyWeb
  • co.mments
  • Reddit
Subscribe:

2008 Google Analytics Resolutions

January 8, 2008 by Justin Cutroni

Happy new year! I can’t believe 2007 is over. Continuing with a tradition I began last year, I give you my 2008 GA resolutions.

Before I get into the list, I want to thank everyone who reads and contributes to Analytics Talk. 2007 was an incredible year for me, and I really owe a lot to you guys. Thank you for reading, posting questions and helping me learn so much.

1. I will migrate to the new GA.JS tracking code.

Google announced a new version of the tracking code, ga.js, in October 2007 and launched the new code in December. After some minor launch problems things seem to be running smoothly. While you don’t need to migrate to ga.js, you should start to think about it because Google will no longer add features to urchin.js. In my opinion, you should tackle this problem sooner rather than later.

2. I will contemplate Event Tracking and how I can use it.

The reason Google introduced a new version of the tracking code was to enable a powerful new feature called Event Tracking. While most folks might think of event tracking as a ‘web 2.0′ tracking tool geared towards video players and Ajax, it’s really a flexible framework for data collection. I was skeptical at first, but now I’m a convert. All of us can take advantage of this new feature.

I’ll be writing more about Event Tracking and its uses when Google pushes the feature to everyone. In the mean time, check out this series of posts to learn more:

Event Tracking Pt. 1: Overview & Data Model
Event Tracking Pt. 2: Implementation
Event Tracking Pt. 3: Reporting & Analysis

3. I will get creative with profiles.

This is something I’ve been talking about for a while. Profiles are so much more than website data. They’re a collection of data and business rules. Last year, as part of my 2007 resolutions, I mentioned setting up test profiles as a way to insure your configuration settings are correct.

For 2008 I suggest setting up profiles for all major marketing campaigns and mediums. Why? So you can segment reports that normally can not be segmented. Check out Segmenting Visitor Loyalty Reports in GA for more information.

4. I will try some type of ‘advanced’ Google Analytics configuration.

Most of us have a fairly basic implementation of GA. We don’t need to do much more than add the tracking code to our site, set up goals, and configure on site search reporting.

Why not try something new this year? How about using an ‘advanced’ feature like custom segmentation, event tracking or even e-commerce tracking? All of these features can help you learn more about your visitors and what they do. That’s why we use these features and try these hacks: to gain insight and knowledge.

5. I will keep track of website changes and Google Analytics changes.

This is something that I wrote about a long time ago, but it’s still really important. It’s a good idea to keep track of your GA configuration changes so you can better understand the data. Any modifications, like a change to a goal, funnel or filter, should be recorded.

It’s also a good idea to keep track of website changes and online marketing changes. Knowing what’s going to happen with your online business helps drive analysis and you’ll be able to deliver data that will make people happy.

You don’t need anything elaborate, a simple Google Spreadsheet, like this one, will work just fine.

There you have it, a few ideas to spice up your 2008 Google Analytics plans. Got a better idea or think that I missed something? Leave a comment below. And happy new year!


Share:
These icons link to social bookmarking sites where readers can share and discover new web pages.

  • Digg
  • Technorati
  • del.icio.us
  • Slashdot
  • StumbleUpon
  • Ma.gnolia
  • YahooMyWeb
  • co.mments
  • Reddit
Subscribe:

Updated GA.JS Tracking Code

December 17, 2007 by Justin Cutroni

I’ve gotten a lot of comments over the weekend about using the new ga.js code with ASP sites. It turns out that the code does not work with nested SP script tags. Also, the new tracking code that GA spits out is not XHTML compliant. These are unrelated issues that are causing a number of issues.

Google knows of these issues and will be pushing a solution soon. I’m not sure when, but soon. In the meantime, here is a copy of the new code that you should use on your site.


<script type="text/javascript">
 var gaJsHost = (("https:" == document.location.protocol) ?
"https://ssl." : "http://www.");
 document.write(unescape("%3Cscript src='" + gaJsHost +
"google-analytics.com/ga.js'
type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
 var pageTracker = _gat._getTracker("UA-xxxxx-x");

 pageTracker._initData();
 pageTracker._trackPageview();
</script>


Remember, you need to replace “UA-xxxxx-x” with the appropriate information for your profile.

Sorry for the short post… I’m pretty tied up at work but wanted to post this information.

Props to Eivind Savio for sending me a nice email about the problem and a number of solutions.


Share:
These icons link to social bookmarking sites where readers can share and discover new web pages.

  • Digg
  • Technorati
  • del.icio.us
  • Slashdot
  • StumbleUpon
  • Ma.gnolia
  • YahooMyWeb
  • co.mments
  • Reddit
Subscribe:

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.


Share:
These icons link to social bookmarking sites where readers can share and discover new web pages.

  • Digg
  • Technorati
  • del.icio.us
  • Slashdot
  • StumbleUpon
  • Ma.gnolia
  • YahooMyWeb
  • co.mments
  • Reddit
Subscribe:

Surprise! New Google Analytics Features

December 13, 2007 by Justin Cutroni

It looks like the team at Google Analytics has surprised us all with some new features. What a great way to celebrate the holiday season. Many of these new changes were actually announced by Brett Crosby at Emetrics and are just now getting rolled out to all of us.

New Multi-Line Graph

Google has added a new features to help with analysis. It’s called multi-line graphing. We now have the ability to graph multiple lines of data in the data-over-time graph that appears at the top of each page. There are two ways to use this feature.

Google Analytics Multi-Line Graphing

First, you can compare two metrics in the graph. This is a great way to determine if there is a correlation between the two numbers. For example, let’s say you want to see if conversion rate stays the same if visits increase. Now you can do that.

Google Analytics: Graph two metrics

The second way to use the multi-line graph is to compare a specific segment of data to the overall site data. This helps you analyze how much the segment of data affected the larger set of data.

The graph below shows AdWords visits (blue) and the total site visits (gray). We can clearly see that there was a big bump in traffic but it was not caused by AdWords.

Google Analytics: Compare Data to Site Average

I’ll have a more in-depth post on this tomorrow.

New ga.js Tracking Code

The new ga.js tracking code is now live. For those of you that don’t know, Google created a new version of the tracking code that supports many new features, primarily event tracking.

The new tracking code is very different. Many of the functions that exist in urchin.js do not exist in ga.js. Things like urchinTracker() and __utmSetVar() are gone. Don’t worry, they’ve been replaced with new methods like _trackPageview() and _setVar().

You don’t need to migrate to the new ga.js, you can continue to use the old urchin.js. However, Google will not update urchin.js in the future. If you want to take advantage of new features you must upgrade.

Check out GA.JS: New Google Analytics Tracking Code for more information about why the basic page tag has changed, how it has changed and if you should upgrade to the new tracking code.

To help facilitate the transition, Google has published a migration guide to help you transition from urchin.js to ga.js. It’s a great resource that does a good job of mapping old tracking code settings to new tracking code settings.

How do you get the new tracking code for your site? For existing websites, there is a new tabbed interface that provides the urchin.js tracking code or the ga.js tracking code. Just click on the “Check Status” link for a profile and you’ll see the tabs. Google will automatically supply the new ga.js tracking code when you create a new profile.

Google Analytics Tracking Code Tabs

Caution: do not use the new tracking code and old tracking code on the same page. However, you can use the new tracking code on some parts of your site and the old tracking code on other parts of the site.


Share:
These icons link to social bookmarking sites where readers can share and discover new web pages.

  • Digg
  • Technorati
  • del.icio.us
  • Slashdot
  • StumbleUpon
  • Ma.gnolia
  • YahooMyWeb
  • co.mments
  • Reddit
Subscribe:

Join Us For Analytics & Usability Training

December 12, 2007 by Justin Cutroni

train.gifNext Tuesday and Wednesday we’ll be hosting a 2 1/2 hour online training session about Analytics and Usability. My co-worker Danielle Giandomenico and I will each speak for one hour to discuss how to use Google Analytics to improve your business. Then we’ll take your questions for a half hour.

Dani will share the techniques she uses to improve user experiences including:

  • Lead form and shopping cart enhancements that lift conversions
  • Key usability metrics in Google Analytics
  • Examples of three websites with different business models and how they could benefit from usability analysis

I’ll be talking about how to effectively use Google Analytic to track and analyze online marketing activities. My topics include:

  • Critical and often overlooked marketing campaign tracking techniques
  • Effective campaign reporting and analysis
  • Tips and best practices for success

The session cost $297 US and you can signup online. If you have any questions please email info -at- epikone -dot- com or call 1-877-273-9921. We look forward to seeing you next week!


Share:
These icons link to social bookmarking sites where readers can share and discover new web pages.

  • Digg
  • Technorati
  • del.icio.us
  • Slashdot
  • StumbleUpon
  • Ma.gnolia
  • YahooMyWeb
  • co.mments
  • Reddit
Subscribe:

My Regular Expression Tool Box

December 10, 2007 by Justin Cutroni

Love em or hate em, regular expression are a part of Google Analytics. They provide a lot flexibility but at a price. Small mistakes can become magnified and result in poor data quality.

I know there’s a lot of information out there about regular expressions, but I wanted to simplify the topic. In my opinion, here are the most important things to know.

Key Concept: How GA Regular Expressions Work

Let’s start by talking about how regular expressions work in Google Analytics. In general, we apply a regular expression to a piece of data. If the expression matches ANY part of the data then the expression will return TRUE. If the expression returns TRUE then some action will occur.

It doesn’t matter where you use the reg ex. If it’s part of an exclude filter, and the expression matches the data, then the data will be excluded. If it’s part of an include filter then the data will be included. If it’s part of a report filter then the report will only contain info that matches the reg ex. You get the idea.

How Google Analytics Filters Work
[In this image think of the data as the square cube and the red work bench as the regular expression. If the cube is the same shape as the hole in the bench then an action happens; the cube falls through. Get it?]

It’s really important to understand this because it simplifies the expressions we need to create. Let’s say I want to identify all the keywords in a set of data that contain the term excel. Here’s the full list:


word
excel
ms excel
excel 2003
linux
microsoft excel
excel 2007
excel makes pretty graphs
google

Rather than create some fancy regular expression, I can simply use: excel. After the expression is applied to the data we’ll have the following sub-set:


excel
ms excel
excel 2003
microsoft excel
excel 2007
excel makes pretty graphs

This simplifies the creation of your expression because you only need to match part of the data that you’re looking for. With that in mind, let’s move on to some tips that cover the most common uses of regular expressions.

Tip #1: Use Anchors

Regular Expression AnchorsAnchors are a way to specify if a regular expression should match the begining of the data or the end of the data. Remember, reg ex works by matching ANY PART of a piece of data. Sometimes we’re looking for data that starts or ends a particular way and that’s why we need anchors. Let’s go back to the excel example.


word
excel
ms excel
excel 2003
linux
microsoft excel
excel 2007
excel makes pretty graphs
google

Suppose I only want to see the items that END with the word excel. Well, if I use the regular expression excel, I’m going to get all the items that contain the word excel no matter where it appears.

I need to create a reg ex that means, “ends with.” That’s done by placing a dollar sign, $, at the end of my reg ex. So the expression to find all of the keywords that END with excel would be: excel$.

It would match the following items from our list:


excel
ms excel
microsoft excel

To find all of the keywords to START with excel use a carrot, ^, at the beginning of the regular expression, like this: ^excel. It would match the following items from the list:


excel
excel 2003
excel 2007
excel makes pretty graphs

Now, let’s say I want just the keyword excel. Here’s how that expression would look: ^excel$.

Anchors, pretty handy.

Tip #2: Find This OR That

ORMany times in an analysis we’ll want to find multiple items from a set of data. For example, let’s say I want to find all the keywords that contain the name of an MS Office product. The complete list of keywords is:


word 2007
microsoft excel
outlook express
powerpoint
windows 95
mac OSX
linux
google rocks

Again, I’m only interested in the MS Office products, so I need to create an expression that includes the names of all the products. I want to find word OR excel OR outlook OR powerpoint. The pipe character, |, is used to represent OR logic. The following expression will return true if any of the items occur in the data:


word|excel|outlook|powerpoint

And here are the results:


word 2007
microsoft excel
outlook express
powerpoint

Tip #3: If in Doubt, Escape it Out!

The dangerous thing about regular expressions is that we often don’t know what we don’t know. There are a lot of characters that have special meaning in reg ex. The plus sign, the question mark and the period are just a few. Inadvertently using a special character in an expression can lead to big trouble. There is an easy way to protect yourself: escaping.

Escaping a character means that GA will interpret the character as a LITERAL character and not as a regular expression character. To escape any character place a backslash in front of the character. Here’s the great part. It doesn’t matter if you escape a non-special character. To me, escaping a character is like using a safety net. If you’re unsure if a particular character is a special character, escape it. It can’t hurt your expression.

Time for an example. Let’s say we want to create a goal based on the following URL:


index.php?id=34

I need to turn the above into a regular expression. The question mark and period are special characters so they need to be escaped. But I’m not sure about the equal sign. I better escape just to be safe. So here’s how the resulting reg ex would look: index\.php\?id\=34. By the way, the equal sign is not a special character.

So there you have it. My two cents on regular expressions. These tips just scratch the surface of what you can do with Reg ex. If you really want to learn about reg ex check out my friend Robbin’s series on the subject.


Share:
These icons link to social bookmarking sites where readers can share and discover new web pages.

  • Digg
  • Technorati
  • del.icio.us
  • Slashdot
  • StumbleUpon
  • Ma.gnolia
  • YahooMyWeb
  • co.mments
  • Reddit
Subscribe:

Google Analytics: Thoughts on the Future

December 4, 2007 by Justin Cutroni

I am continuously amazed at how fast our industry changes. In the two years since Google Analytics was launched we’ve seen Web Analytics grow in popularity and web analysts become highly prized in the marketplace. Many people attribute the change to Google Analytics which got me thinking about GA and how it may evolve in the future.

I’d like to mention that this post is purely opinion and speculation. I have no idea what Google’s master plan is for Google Analytics, but I do think that my ideas are possible.

picture-6.png

Let’s start by looking at where Google is going as a business. Google’s long term strategy is to become the dominant advertising network on the planet. It’s something that CEO Eric Schmidt has talked about in the past and it make total sense. The more advertising options that Google can offer it’s current customers the bigger the opportunity for growth.

Google’s success relies on the adoption of said advertising tools. Look at AdWords and the insane revenue it generates. Now image if Google could create 3 or 4 more advertising products that are as successful as AdWords. We’ll be looking at Berkshire Hathaway stock prices in no time.

The expansion of Google’s advertising platform began with audio ads and print ads and I’m sure they’re not going to stop there. These new products are simple, thus making them accessible to businesses that may not normally branch out into a new advertising medium. I’ll talk about specific Google advertising products and my thoughts on each in a moment, but what does all this mean to Google Analytics?

No matter what advertising tools Google creates, there needs to be a centralized reporting and analysis component. GA is that piece of the puzzle. It’s no secret that Google wants to create the Google Marketing Dashboard, why not base it on Google Analytics? It makes complete sense, right? GA is a data analysis tool so why not use it to analyze all marketing data? At the very least GA should be the analysis piece of the puzzle.


That’s the long term vision, but what type of integration opportunities exist right now?

The most basic integration is the inclusion of advertising cost data into Google Analytics. Audio cost data, print cost data… it’s natural to think that these will be pulled into GA soon.

The next integration step should be the automatic identification of online traffic that originated with an offline ad. Image if you could automatically create vanity URLs for your audio or print campaigns and have GA automatically track them. We’re already doing this manually, but it could, and should, be automated by Google. This type of integration will further remove IT from the configuration of GA making it easier for all types of organizations to track offline marketing efforts.

Let’s get even more specific.

Google AdWords

picture-1.pngNo need to talk much about this one. Google is the 800 pound gorilla in the paid search world. AdWords campaigns are automatically tracking in Google Analytics and cost data is automatically imported to compute ROI. Pretty slick. It would be nice if Google could pull in cost data from other paid search vendors, but there are probably too many political hurdles for this to happen.

Google Audio Ads

picture-2.png
I mentioned this one above and wrote a post about tracking audio ads with Google Analytics it in the past. I think audio integration is pretty logical. Beyond the cost data, I would like to see some type of map overlay report correlating geographic web traffic and the distribution of audio ads. The addition of automatically created vanity URLs for audio ads would provide a slick way to connect online conversions to the originating audio ad.

Google Print Ads

picture-3.png
Print is very similar to audio and I think it’s something we could see soon. Many of the same integration points exist for print ads including cost data, a map overlay of ad distribution and web visits and an automatically created vanity URL for print ads.

Graphic (Banner) Ads

This is another one that could be very close. Once the purchase of DoubleClick is finalized I bet we’re gong to see DoubleClick’s pre-click data rolled into GA quickly. Maybe they’ll add a DoubleClick item to the Traffic Sources menu below the AdWords menu item.

I think we’ll also see an auto-tagging feature for ads displayed on DoubleClick’s network. No more tagging destination URLs. Woo hoo!

Mobile

picture-7.png
Everyone loves to talk about mobile tracking. But the fact is that mobile tracking right now is miserable. The inconsistent implementation of JavaScript on mobile devices makes it very hard to track visitors on mobile devices.

Google has taken a big step to improve mobile tracking with the announcement of Android. This isn’t just a mobile browser, it’s a complete platform for mobile devices. It’s also a way that Google can insure that they’re very involved in the future of the mobile web. I’m sure that Google will include some type of mechanism in Android to track visitors.

Video (Google Video & YouTube) Ads

picture-8.png
Google is poised to provide some amazing data about how people interact with video. The new Google Analytics Event tracking feature is a logical, structured way to measure visitor engagement with video and video ads. I really hope that event tracking is added to all YouTube videos so we can all measure the performance of video content. Once we know how visitors are engaging video we can choose optimal placement of video ads.

I also expect Google to facilitate the creation of video ads in the same manner they did with audio ads and print ads. Maybe they’ll create a video ad marketplace.

Email Marketing

Google does not have an email marketing solution, but why couldn’t they leverage Gmail and create one? Just add a basic interface where users can upload a recipient list and some type of interface where they can style the email and you have a very effective email marketing tool.

But what about all of those people that don’t use Google advertising tools? What if someone just wants to use GA to measure website traffic? What cool features can they expect from Google?

I think Google’s commitment to GA goes well beyond the integration of advertising data. Google has a vested interest in providing tools that help EVERYONE make the web a better place. Part of Google’s philosophy is to, “Focus on the user and all else will follow.”

Analytics is one of the tools (and the most mature, I might ad) that Google provides so we can all make the web better (Website Optimizer and Google Trends are two others). The more analysis features that Google can pack into GA the more effective we’ll all be at making our sites better.

picture-5.pngCase in point, GA version 2. It was a major improvement in analytics UI design that facilitates analysis. Is it perfect? No, of course not. But it really makes analysis easier for everyone. I expect that Google will continue to refine the reporting interface by giving us more data visualization tools and more context for our data.

So what does this mean to other analytics vendors?

I don’t think that any other analytics vendor will be able to track Google based advertising (AdWords, Audio ads, etc.) as well as Google. I know that seems obvious, but it is a big deal, especially when Google becomes the major advertising network on the planet. Google can provide a view of offline ad activity and the resulting online behavior because they will have all the data. Could other providers create similar reporting? Maybe, but it won’t be as easy.

I also believe that we’ll continue to see consolidation. Google has, in my opinion, made web analytics tools (and testing tools) a commodity. Is there still a need for $250,000 web analytics application? Maybe, but I guarantee you people are taking a closer look at GA and evaluating the features that they really need before dropping hundreds of thousands of dollars.

Think I’m nuts? Think OmniSciences will take over the world? Leave a comment and let me know.


Share:
These icons link to social bookmarking sites where readers can share and discover new web pages.

  • Digg
  • Technorati
  • del.icio.us
  • Slashdot
  • StumbleUpon
  • Ma.gnolia
  • YahooMyWeb
  • co.mments
  • Reddit
Subscribe:

Tracking Sub Domains with Google Analytics

November 19, 2007 by Justin Cutroni

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 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!


Share:
These icons link to social bookmarking sites where readers can share and discover new web pages.

  • Digg
  • Technorati
  • del.icio.us
  • Slashdot
  • StumbleUpon
  • Ma.gnolia
  • YahooMyWeb
  • co.mments
  • Reddit
Subscribe: