E-Commerce Tracking In Google Analytics

As Business Owners and webmasters of E-Commerce site, being able to determine where the majority of your revenue is coming from, the value of those purchases, what products your customers are buying, the number of purchase orders, the average order value and revenue from each of those purchases, total number of web-based sales, conversion rates and the percentage of visits that result in purchases. Understanding buying patterns, purchasing trends, sales funnels, visit duration and the number of visits it takes for a purchase, time lag & the time it takes for customers to make a purchase is a critical process to understand and implement for any business and that is why e-commerce tracking is so important because it will enable you to gather and analyse actionable data to make understand those questions and to make informed decisions and actions to achieve success.

How it Works

A visitor submits their transaction to your server. Your server receives the transaction data and processes the transaction. After processing the transaction the server prepares to send the receipt page back to the visitor. While preparing the receipt page your server must extract some the transaction data and insert it into the Google Analytics JavaScript. The receipt page is sent to the visitor’s browser. While the receipt page renders in the visitor’s browser the e-commerce data is sent to Google Analytics via special GA JavaScript.

What Data can be Tracked?

Google Analytics collect two types of e-commerce data: transaction data and item data. Transaction data describes the overall transaction (transaction ID, total sale, tax, shipping, etc.) while item data describes the items purchased in the transaction (sku, description, category, etc.).

E-Commerce Tracking Process

Before Google Analytics can report ecommerce activity for your website, you must enable ecommerce tracking on the profile settings page for your website.

E-commerce tracking does require you to insert transaction data into the Google Analytics Tracking Code and implement the GA Javascript ecommerce tracking methods in your shopping cart pages. There are three methods required for tracking ecommerce transactions on your site. These include the following;

1. Transaction Object

Use _addTrans to intialize a transaction object. The transaction object stores all the related information about a single transaction, such as the order ID, shipping charges, and billing address.

2. Add items to the transaction

The _addItem tracks information about each individual item in the user’s shopping cart, such as SKU, price, category, and quantity.

3. Submit the transaction to the Analytics servers

The _trackTrans confirms that a purchase has occurred.

Add transaction details

The next code block provides information about the transaction. It must include the following data in this order:

Add individual products

A code block is required for all products purchased within the transaction. The data is required in the following order:

Submit the transaction
The last instruction submits all transaction data to Google Analytics:

Once you have inserted the Javascript Code, an example of how it could look like is as follows;

Be Sociable, Share!

Speak Your Mind