eCommerce Tracking


NOV | 2015

eCommerce Tracking

Ecommerce tracking is a method to measure the number of transactions and revenue obtained your website. In a typical eCommerce website , if the user once clicks the “purchase” button the information regarding the purchase is been sent to the server directly so that the transaction is carried out. Once the transaction is done successfully the server will redirect the user a “thank you” or the transaction details of the receipt page of purchase. Analytics.js library is used to send the data “Thank You” from your ecommerce page to Google Analytics.

    General Process

    We can summarize the method for tracking ecommerce transactions in your website with three methods. The methods that are described below are in the order in which you bring your ecommerce software or your shopping cart.

  • Creating transaction object

  • To initialize a transaction object use addtrans(). The transaction object will store all the necessary information regarding a single transaction like shipping charges, transaction ID, and also billing address.

  • Adding items to transaction

  • To track the information about each individual item in the shopping cart, we use additem(). Via the transaction field it associates each item. This is used to track about a particular item, may be price, quantity, SKU, category etc.

  • Submitting transaction to server analytics

  • We use trackTrans() to confirm that the purchase has been occurred and the complete data is built up in the transaction object and is finalized as transaction. This information can be recouped from the ecommerce engine through many ways. You can keep in a hidden form the information of purchase, or can place in a database which can be retrieved or can store in a cookie.