The future of e-commerce is mobile. It lives in tablets and smartphones. There shouldn’t be a retailer out there who doesn’t know this to be true. But a new study by the mobile services provider Zmags (Mobile and Tablet Ecommerce: Is Anyone Really Ready?) found that only one-third of the top U.S. online retailers are even optimally ready for mobile e-commerce. Two-thirds of top U.S. retailers currently overlook this market opportunity. Neither are they ready for today’s shoppers using tablets and smart phones, nor can they identify new, incremental sources of traffic and conversions.
If you want to effectively analyze online business performance you need transaction data. It’s vital. Measuring metrics like conversion rates is all well and good, but measuring revenue truly captures a business owner’s attention. To make the analysis simple, include e-commerce data in your web analytics application.
You must first enable e-commerce reports. Log into GA and edit the profile settings. To activate the e-commerce reports, specify that your site is an e-commerce site.
Unless you have an international site, you won’t find much use for the other e-commerce settings. For example, you can specify one of 25 different currencies and the number of decimal places you want displayed. Even if you use USD you can specify 3 decimal places. By Default, e-commerce tracking is set to “off”. In order to track a transaction on GA activate e-commerce tracking at a profile level.
Make sure you add the GA tracking code on your receipt page. The e-commerce tracking code is stored in the ga.js and if this file is not included on the receipt page you can’t track transactions.
Code construction: the hard part. 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 JavaScript executes and sends the transaction info to GA.
Here’s 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 >
There are three distinct parts to the JavaScript, and 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 separate 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 transaction. The final section, the _trackTrans() method, 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 for the __utm.gif.
The JavaScript shown above can appear anywhere on your receipt page. But make sure that it appears after the main GA page tag because the e-commerce code is part of the pageTracker object. Just to reiterate a point: you must create server side code that outputs the transaction data in the above format. If you do not have access to your shopping cart code, and if your cart provider does not provide e-commerce tracking, you may be out of luck.
Once the code has been installed you should begin to see e-commerce data in your GA.
Google Analytics collects two types of e-commerce data: transaction data and item data. Transaction data describes the overall transaction (transaction ID, total sales, 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.
The complete list of data includes:
A few notes about the data:
Contact us to learn more about how analytics can improve your business.