Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How to configure ecommerce tracking in your Google analytics

If you have an online Ecommerce presence and want to get the most out of it, doing so is more than just displaying items and having a purchase function. That will be a good starting point but as you grow and develop and use different techniques and strategies to increase throughput and sales, you want to know what is working and what to do more of. That is basic business acumen – online or otherwise. And that’s where Google Analytics can help. Google Analytics allows you to measure your advertising impact, track your multimedia traffic as well as your social networking and app traffic and usage. But one of the great things it can do is ecommerce site tracking. This enables you to measure the number of transactions and the revenue that your business website generates.

How does this work? Typically when an online purchaser clicks the ‘buy’ or ‘purchase’ button the user’s purchaser information is sent to the web server which carries out the transaction. When successful this usually redirects the user to a ‘thank you’ or ‘transaction complete’ page. Ecommerce Tracking sends the data from this page to Google Analytics.

There are two types of ecommerce data that can be analysed via Google Analytics; transaction data and item data. The former represents the entire transaction that occurred on your site and includes values such as the transaction code or ID, the brand or store affiliation of the item, the total revenue from the sale, the shipping costs and any tax paid. The item data represents the individual products that were in the cart including the transaction ID, the item name, item code, product categories, price and quantity.

How to start? The default Analytics library does not include ecommerce Tracking as standard so to set up ecommerce tracking you need to enable it at the view level or add the plug in. Enabling it is simple from the ADMIN button on the menu bar at the top of Analytics. Use the drop-down menus to select the Account, Property and View details, click View Settings and in the commerce settings section shift the toggle so that it says ‘on’. Click Save at the bottom of the page. It’s that simple.

Configuring ecommerce tracking can be technical so you may want some developer support in doing this. It can differ depending on the specific environment i.e. website tracking or mobile app tracking and whether your collection snippet is already using Universal Analytics or Google Analytics. For Google Analytics the general process is as follows and should be invoked in your ecommerce software in this order:

1.    Click Admin on the navigation bar.
2.    Select View Settings in the right column.
3.    Switch Ecommerce tracking to the on position.
4.    Save Setting.

1. Create a transaction object

Use the addTrans() method to initialise a transaction object. This stores all of the related information about a single transaction. This must include the Transaction ID.

2. Add items to the transaction

The addItem() method then tracks all of the information about the individual items in the online users shopping cart and associates the item with each transaction via the transactionId field (which is why we said it must be included in the transaction object).

3. Submit the transaction to the Analytics servers

Lastly, the trackTrans() method confirms that a purchase has actually taken place and off the data that has been accumulated up in the transaction object is finalised as a transaction.

 

<script>

(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,’script’,'//www.google-analytics.com/analytics.js’,'ga’);

ga(‘create’, ‘UA-xxxxxxxx-x’, ‘yourdomain.com’);
ga(‘send’, ‘pageview’);
ga(‘require’, ‘ecommerce’, ‘ecommerce.js’);

function trackEcommerce() {
this._addTrans = addTrans;
this._addItem = addItems;
this._trackTrans = trackTrans;
}
function addTrans(orderID,store,total,tax,shipping,city,state,country) {
ga(‘ecommerce:addTransaction’, {
‘id’: orderID,
‘affiliation’: store,
‘revenue’: total,
‘tax’: tax,
‘shipping’: shipping,
‘city’: city,
‘state’: state,
‘country’: country
});
}
function addItems(orderID,sku,product,variation,price,qty) {
ga(‘ecommerce:addItem’, {
‘id’: orderID,
‘sku’: sku,
‘name’: product,
‘category’: variation,
‘price’: price,
‘quantity’: qty
});
}
function trackTrans() {
ga(‘ecommerce:send’);
}
var pageTracker = new trackEcommerce();

</script>
Extracting the information from the ecommerce engine can be done in a number of ways. Some ecommerce engines write the information in a hidden format for retrieval, others store in a database and some do so in a cookie. All are easily accessible. With this data, you can make powerfully effective decisions on your ecommerce marketing strategy.

The post How to Configure Ecommerce Tracking in your Google analytics appeared first on .



This post first appeared on Web Design Company London | Vital Concept, please read the originial post: here

Share the post

How to configure ecommerce tracking in your Google analytics

×

Subscribe to Web Design Company London | Vital Concept

Get updates delivered right to your inbox!

Thank you for your subscription

×