Google Analytics E-Commerce Tracking Pt. 4: Tacking Lead Gen Forms
July 2, 2008 by Justin CutroniOne thing that I try to stress in my client work and training is that Google Analytics is a platform. If you understand the framework you can use it to track many different things. E-commerce tracking is one part of Google Analytics that is particularly flexible and can be used many different ways.
There’s a lot you can do with e-commerce tracking even if you’re a non-commerce site. You can use the e-commerce reporting to monetize lead gen forms and measure visitor interactions with a form.
The Need
Let’s say we have a lead gen site that sells books, cars and jets (a completely unlikely combination). The site has a very simple lead generation form that let’s the user choose the item they are interested in and their time frame for purchase.
We want to measure which fields visitors fill out, the values they choose, and the overall value of the form.
The Implementation
To measure the above I created a simple form using HTML and JavaScript. Here’s what the form looks like:
And here is the source of the above form:
When the visitor submits the form the JavaScript code assigns a value to both the item that the visitor chose and their time frame for purchase. It then calculates a total value for the form by summing both values.
In this example a form that includes a high priced item (like a jet) and a short time frame (buy now!) is worth more than a low priced item with an unknown time frame. I chose arbitrary values for each item and each time frame, but you could derive these values from business data.
After manipulating the data the code places both pieces of information in the GA e-commerce format where they are happily whisked away to Google.
I decided to do all of the calculations in JavaSript because it was easy. You could create a “form calculator” on the server side, but you would still need to format the data like a transaction in order to send it to Google Analytics.
The Data & Analysis
Remember, we’re using the e-commerce framework to equate products to form choices. So any report that displays product information will really show form elements and their values.
The best example of this is the E-Commerce > Product Performance > Product Overview report. This report simply lists all of the products that were purchased in all of the transactions.
Based on the way I created the code, each “product” in the report will be a combination of the item that he visitor is interested in and their time frame for purchase.
How is this data actionable? This information is the direct voice of the visitor. The visitor is literally telling us what they want and when they want it.
From the report above we can see that everyone wants a jet. Most visitors did not specify a time frame for purchase but one visitor wanted a jet today. I’d call that a hot lead!
Another report that is very useful is the E-commerce > Transactions report. In our configuration this report lists all of the forms that have been submitted and the value of each.
The great thing about this report is we can drill into each transaction and review the specific form details. If I click on the first transaction in the report above I get the details of the form (see image below).

I know this example is not that exciting, but image a form with many, many fields. You would be able to see all of the visitor’s choices and better understand what made a specific form valuable.
The effect of using e-commerce tracking for a lead gen form goes far beyond the e-commerce reports. Remember many reports in Google Analytics have an e-commerce tab that displays monetary metrics related to the data in a report.
For example, the Traffic Source > All Traffic Sources report will show metrics like average order value, transactions and revenue for each traffic source. If you use standard goal tracking you will only get conversion rate. I think this is far more valuable.

A Reminder
You’ve probably figured out that you can use e-commerce to collect many different types of data. Please be mindful of your site’s visitors and the Google Analytics privacy policy. It is not permitted to collect personally identifiable information using Google Analytics.
This is part 4 in a multi-part series on e-commerce tracking. You may be interested in parts 1, 2 and 3:
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. 3: Why EVERYONE Should Use It











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





The 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
This post is the first in a series of e-commerce transaction tracking with 




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

