The First Step: Get a Google Analytics Account
The Second Step: Enable Tracking in Google Analytics
• Sign into your Google Analytics account.
• Choose the desired account.
• Go to the “Admin” tab from the top navigation.
• Turn the “Enable e-commerce” toggle switch to “On.”
The Third Step: Add Tracking Codes
Thank you for your order. You will shortly receive an email containing all your order details.
</body>
</html>
Note 2: Make sure that website visitors aren’t able to access the receipt page directly without making a purchase. Failing at this will skew your e-commerce stats.
Syntax: _addTrans(orderID, store name, total revenue, tax, shipping, city, state, country)
Here’s an example:
Next, you’ll need to add items to the transaction. This is achieved by utilizing the _addItem() method. Remember that the information collected so far is limited to the transaction and won’t include individual items. Therefore, this step is focused on gathering product information, such as stock keeping unit (SKU), total quantity, price, and item category.
Continue Reading
Recommended articles you might enjoy
Hire SEO Consultant for Startups & Law Firms in Manzanillo
World Web Solutions — Local SEO Experts Hire SEO Consultation for YourStartups & Law Firm in Manzanillo Grow your startup…
Read Article →Hire SEO Consultant for Startups & Law Firms in Lázaro Cárdenas
World Web Solutions — Local SEO Experts Hire SEO Consultation for YourStartups & Law Firm in Lázaro Cárdenas Grow your…
Read Article →Here’s an example:
Here’s how the _trackTrans() method works:
_trackTrans() is utilized to send e-commerce tracking data to Google Analytics via an invisible _utm.gif file. The file is requested in two instances:
1. Each visitor’s transaction
2. Each unique product
Syntax: _gaq.push([‘_trackTrans’]);
Note 1: The _trackTrans() method should always be called after the following methods: _trackPageView(), _addTrans(), and _addItem() methods.
Note 2: The use of _trackPageView() will associate the purchase with the page titled something like “Receipt ofyour purchase – Shoe Shop”
Collecting Meaningful Analytics Data
- The argument list for both _addItem() and _addTrans() is correspondent to position. Certainly, you don’t need all of the arguments, but supplying empty placeholders for arguments that aren’t specified is vital. This will prevent calculation errors. For instance, you could add an item that contains quantity, place, SKU, and transaction ID in this manner: _addItem(“9856”, “684”, “”, “”, “95.61”, “1”);
- SKU codes are a must for every item in the transaction. When the SKU isn’t provided for all items, then GIF request would only be requested for the last product containing a SKU. Also, if the same SKU is assigned to multiple products, the e-commerce tracking data would only be available for the one added most recently. Your analytics will be skewed in both cases because all transaction purchases wouldn’t be accounted for.
- Currency conversions ought to be handled before sending the data to the Google Analytics server. The “Price” and “Total” parameters don’t follow any currency formatting. Without currency formatting, the parameters consider the period (.) and comma (,) as fractional value. Unless handled by your eCommerce platform’s software, the e-commerce tracking data sent to Analytics will consider 44,550 dollars as $44.55 which will end up by supplying very wrong input.



