Magento Google Analytics Funnel for Tracking Each Step of One Page Checkout

Magento Google Analytics - I have spent the entire afternoon working on a client’s Magento website. As an update to my previous post “Magento One Page Checkout vs. Multipage Checkout“, I needed to set up a Google Analytics funnel to accurately track each step of the One Page Checkout process. Because it obviously only uses one page and AJAX, the default Google Analytics configuration is not able to track each of the six steps of the checkout process to determine where the visitors are abandoning their transactions. Clearly, it is very valuable to have that information available. Luckily for us, we are able to do just that. Here are the steps:

1. Open up the template file /app/design/frontend/default/YOURTEMPLATENAME/template/checkout/onepage.phtml in a text editor or WYSIWYG web editor such as Dreamweaver.

2. Paste the following code to the very bottom of the onepage.phtml file (You may have to replace the quotes in plaintext for it to work, fyi):

<script type=”text/javascript”>
Checkout.prototype.gotoSection = function(section) {
try {
pageTracker._trackPageview(’<?php echo $this->getUrl(’checkout/onepage’) ?>’ + section + ‘/’);
} catch(err) { }

section = $(’opc-’+section);
section.addClassName(’allow’);
this.accordion.openSection(section);
};
</script>

3. Save and upload the template file and you are done with the hard part and you will now be able to track the views of each of the six steps!

4. Now if you want to set up the Google Analytics conversion tracking and funnel to determine where the users are dropping off, you can do so by creating a new Goal in Google Analytics and by using the following settings:

Goal Type: URL Destination
Match Type: Head Match
Goal URL: /checkout/onepage/success/

Funnel Steps:

Step 1: /checkout/onepage/
Step 2: /checkout/onepage/billing/
Step 3: /checkout/onepage/shipping/
Step 4: /checkout/onepage/shipping_method/
Step 5: /checkout/onepage/payment/
Step 6: /checkout/onepage/review/

And that’s it!

Alexa vs Compete vs Quantcast vs ComScore vs Hitwise vs Nielsen

All of these third-party analytic services are terribly inaccurate but will continue to be used until a more accurate tool is available. Below is an overview of the methodologies used for collecting data for each of these services:

Alexa
Methodology: Captures traffic data from users who download and use the Alexa Toolbar in their web browser. They also claim to use other “diverse traffic data sources”, which is very vague.

Sample Size: There is no known number of current Alexa Toolbar users, but it is said to be in the “millions.” I would bet that size continues to decline as more and more spyware programs flag the Alexa Toolbar as spyware/adware and either uninstall or completely block installation of the toolbar in the first place.

Problems: Well, there are a few:

1. Easily skewed - Since the Alexa Ranking is determined by users who have the Alexa toolbar installed, it is often in the interests of a website owner to install the Alexa toolbar themselves to increase their own Alexa ranking. And that is precisely the case. That is why you will see most webmaster forums and SEO blogs have high Alexa rankings, even if they don’t get much traffic overall.

2. Easily manipulated - Even though Alexa claims they have since added measures to prevent intentional manipulation of their rankings, it is still possibly to increase your own Alexa ranking by installing the toolbar and visiting your own site. Try it out for 7 days straight and I guarantee your Alexa ranking will increase significantly.

3. Catch 22 - Most webmasters nowadays are aware that the Alexa ranking is often inaccurate and thus say “oh the Alexa ranking doesn’t mean anything.” But in reality, most of them do care about it because many advertisers use Alexa ranking data to determine which websites they want to advertise on. And people looking to buy a domain name or website will often do the same in determining the value of a site. So it’s a Catch 22 - the webmaster knows the data is inaccurate and shouldn’t care about it, but they do care about it because advertisers care about it. And that will continue to be the case until more accurate data is available.

Compete
Methodology: Captures traffic data from “diverse sources” such as the Compete Toolbar and ISP logs.

Sample Size: Approximately 2,000,000 U.S. users, or 1% of total market

Problems: While not as easily skewed or manipulable as Alexa, the sample size is so small that the data is often wildly inaccurate.

Quantcast
Methodology: Quantcast measures websites that have installed their tracking code directly in the HTML of the website

Sample Size: They claim to have 80,000 “Quantified Publishers” who have installed the tracking code across 10 million websites.

Problems: Again, the sample size. The majority of websites do not have the QuantCast tag installed on their site so it is impossible to compare the traffic of a website that is able to be directly tracked with their tracking code and ones that are not.

ComScore, Nielsen, HitWise (I am lumping these three together for the time being)
Methodology : Most of these get their data from willing participants. Their users agree to install survey software on their computers to track their usage. These companies also get data from ISPs.

Sample Size: 2 million to 10 million in the US

Problems : Sample size, sample size, sample size!

(I will continue this post later, I just had to get something written since I’ve been meaning to for quite some time!)

How to Track Google AdWords Broad Match Keywords in Google Analytics

If you do a lot of work with Google AdWords and Google Analytics, you’ve probably already realized that Analytics does not accurately report traffic data for broad match keywords from AdWords. For example, let’s say I run a website that sells guitars and I bid on the following broad match keywords:

guitars
buy guitar
guitar
guitar for sale

I run the AdWords campaign for 30 days and get 1000 total clicks for those keywords. Google Analytics will show 1000 clicks for only those four keywords. However, since they are broad match keywords, the AdWords campaign likely generated clicks for other “similar” keyword phrases such as:

guitar picks
guitar tuning in richmond, va
free guitar lessons in arkport, new york

Google Analytics will only report traffic coming from the 4 broad match keywords that we bid on in the AdWords campaign.  So if we only sell guitars and don’t offer guitar lessons or guitar picks, we are wasting money on those clicks. There are several ways to get this data, such as by adding custom filters. However, those solutions only work if the traffic is being tracked as AdWords traffic. In some cases, the AdWords traffic will be counted as Organic traffic in Analytics and another solution must be used. You’re in luck because I will write about that in my next post. :)

ClickTale vs Crazy Egg

I am a huge fan of constantly testing the performance of webpages in order to improve conversion rates. ClickTale and Crazy Egg are two of my favorite analytical tools. Stumped on which one to try? Here I will break it down:

ClickTale

Pros - Actually records videos of user sessions. This is incredibly useful. It also provides great insights on contact forms.  Also offers a free trial, which Crazy Egg does not offer.
Cons - More expensive for paid plans.

Crazy Egg
Pros - Cheaper.
Cons - Does not record videos, but still provides valuable heat map data. Also, does not provide a free trial.

More in-depth analysis coming shortly!