Google Analytics E-Commerce Tracking Pt. 4: Tracking Lead Gen Forms

July 2, 2008 by Justin Cutroni

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

Google Analytics Prodcut Performance Report.

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.

Google Analytics Transaction Report for Lead Gen Site.

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

Individual Google Analytics Transaction Detail

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.

Google Analytics Traffic Sources report for Lead Gen.

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


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:
  1. 11 Responses to “Google Analytics E-Commerce Tracking Pt. 4: Tracking Lead Gen Forms”

  2. Hi Justin,
    Just wanted to say thanks for this post! (And the last one too.)

    Ever since the seminar in San Francisco I’ve been seeing almost every contact form as an opportunity to use e-commerce tracking to get more accurate information. This post answers the inevitable question: “Why should we do that?”

    By David Burke on Jul 3, 2008

  3. Hi Justin,

    I really appreciate your blog, I’ve found lots of tips and tricks to apply to analytics for my affiliate business.

    One question I have though is what if the “thank you” or lead confirmation page is remotely hosted. Many times the remotely hosted page also has it’s own GA tracking installed. I want to do all the split testing possible on my landing page but also relate it to conversions on this remotely hosted page while not screwing up their data.

    Any suggestions.

    Again, really appreciate this blog and hopefully going to attend one of your seminars in the future.

    Thanks,
    Tob

    By Tob on Jul 4, 2008

  4. My analtic data suddenly stopped workin after months of recieving data. What’s going on? I did a scan and it came back fine. If you have time could you provide me some direction?

    By justin on Jul 4, 2008

  5. Hi Tob,

    Glad you like the blog and find it useful. If your thank you page is hosted by a third party then you want to implement cross domain tracking. This feature will let you track the visitor from the originating source all the way through to conversion.

    The cross domain tracking feature requires that you add your tracking code to the remotely hosted page. If you can not add your code to the remotely hosted page then you won’t be able to see conversion data in your GA account.

    Hope that helps,

    Justin

    By Justin Cutroni on Jul 7, 2008

  6. Hi Justin,

    Great name ;)

    I would check two things to determine why your analytics data has stopped collecting:

    1. The tracking code: make sure the code is on every page that you want to track. If it is not then you will not get the data you expect.

    2. Profile settings: make sure you have not added a filter or changed a setting that excludes all of your data from GA.

    These are the most common culprits when GA data “flatlines”.

    Thanks for reading,

    Justin

    By Justin Cutroni on Jul 7, 2008

  7. Hi there,

    With the javascript in your example, do you need any further code (apart from the standard tracking code) on the thankyou page?

    Cheers, ToNy!

    By sheds on Jul 17, 2008

  8. Hi Sheds,

    The code I created is meant to be an example. The code that you will use on your site will differ for a number of reasons.

    First, the form that you are tracking will probably be different than my form. That will cause the JS to be different.

    Second, the ‘calculator’ you create will have different values because your form choices will have different values.

    I suggest using the code above as a test. Install it on your server, observe the results and then start building one for your site.

    Hope that helps and thanks for reading.

    Justin

    By Justin Cutroni on Jul 17, 2008

  1. 4 Trackback(s)

  2. Jul 3, 2008: SEM News: SearchCap: The Day In Search, July 3, 2008 - Search Engine Marketing
  3. Jul 4, 2008: SEMW.biz » Blog Archive » SearchCap: The Day In Search, July 3, 2008
  4. Jul 6, 2008: Web Analytics Bloglinks der Woche (KW 27 / 2008) | Web Analytics News
  5. Jul 29, 2008: Shredding APART your Google Analytics for the Juicy Stuff Plus 11 Other Goodies » Barbara Ling

Post a Comment