Home > Magento Tutorials > Magento & Google Analytics Ecommerce

Magento & Google Analytics Ecommerce

Posted on: 14th May 2010 By: Adam Moss No Comments

Analytics

The latest version of Magento (1.4.0+) comes ready made with the ability to integrate an advanced version of Google Analytics, allowing you access to some very useful data in your Analytics account. I’ve been using Google Analytics for a long while and you can spend ages just going through all the data about your site, particularly when the stats are high. However Analytics has always missed vital ecommerce information… until now. The software now includes:

  • Number of transactions in the last month
  • Total value of transactions
  • Best selling (most profitable) products
  • Keywords used to get to products
  • Traffic sources to products
  • Conversion rates
  • Geographical location of buyers

With this type of data it provides you with a lot more information to analyse which keywords are working, and which are providing the desired results for the user. I’m going to go through a quick overview of how to get it set up and working for your store. In tribute to early 90′s kids TV, here’s one I made earlier….

Step 1 – Google Analytics

Ok, so you’ve set up an Analytics account for your website. Go onto the Overview page where it shows the Website Profiles and click ‘Edit’ next to your site. In the top box titled ‘Main Website Profile Information’, again click ‘Edit’.

The two things you want to change are:

  1. Currency to British Pound Sterling (GBP UK £)
  2. Yes, an E-Commerce Site

Analytics Settings

If you now go back to the Overview page, make a copy of your Analytics account number which is something like this: UA-3998885-4 – you’ll need this in a minute…

Step 2 – Magento Admin

Now that Analytics is set up, we need to link it with the Magento store in question.  Go to System > Configuration > Google API.

The next bit is really tricky…. no it’s not, in the Google Analytics tab, set it to ‘Enabled’ and paste in your account number. That’s pretty much it! Check your source code on your website’s homepage. The tracking code should be riding high inside the <head> tag rather than tucked away in the depths of your site where it’s usually placed.

So… what next?

The best thing you can do straight away is to test out the code by doing a dummy checkout with your store. Our testing site sells a nice brown cowboy hat for £19.99, perfect for those sunny days out on the ranch…. ahem. So I’ve just done a test purchase and landed on what’s known as the ‘Receipt Page’. This is where it tells you that your order is successful and provides you with an order number. If you check the source code on this page, you can see it in action:

Tracking Code

As you can see, it has gathered the Product Name, SKU, Price and Shipping Price as well as customer information including my City, County & Country. Now let’s have a look at the Analytics. Go into your website profile and at first you’ll notice the ‘Ecommerce’ tab has been added to the top left menu.

Ecommerce Analytics

There’s also a small ecommerce overview at the bottom of the page, which can be clicked into for more information. It can take up to 24 hours to update, but you’ll notice that the line graph will show a sale. Clicking into this will then provide you with more information about the sale than you’ll ever need.

Ecommerce Overview

Thanks for reading this tutorial at the Magento Blog on Ecommerce Website Design. Check back for more tutorials and articles throughout the week.

Post A Comment

Your comments:
Enclose code snippets within the appropriate tags: [php][/php]   [js][/js]   [xml][/xml]   [css][/css]   [html][/html]
E.g: [php]<?php echo "hello world"; ?>[/php]

Search Blog

Archives

For the record...

Views & opinions in this blog are those of the individual and do not necessarily reflect those of E-commerce Web Design or the Creare Group.