How to integrate Google Analytics to Magento?
By Jithin on October 14th, 2016
Magento is familiar to the Internet users who used it to purchase products via the web. In this article, we are going to see the Magento Analytics in detail. Let’s see what Magento is and how it’d be helpful to the website owners.
What is Magento?
The Magento can be defined as an open source ecommerce platform. It is one of the best ecommerce platforms available at the moment. It plays a vital role in the online trade. Magento provides a shopping cart system. It also allows control over the look and content and functionality over their online store. The primary specialty of the Magento is it is open source. Magento provides you with powerful marketing, search engine optimization, and catalog-management tools. Magento versions are available in various ranges from community open source to large scale enterprise SaaS based systems.
So what is ecommerce? Ecommerce is the term used for commercial transactions that is conducted on the Internet by electronic means. It often includes financial transactions such as online payment, refunds, and credits. It is also defined as the buying and selling of goods and services or transmitting funds over the Internet.
What is Google Analytics?
The Google Analytics is a free service provided by Google to monitor traffic to your website. Suppose you are the webmaster or website administrator of a website. You can track traffic and conversion ratio of your website with the help of Google Analytics. In Magento, there are two types of tracking.
1) Page View Tracking
2) Ecommerce Tracking
Page View Tracking
The page tracking is the method of measuring the number of views for a particular webpage of a website. Usually, we use the term pages to specify an entire HTML document. In the page view tracking, we can also track the views for a dynamically loaded content. This is called virtual page view.
Let us look into how to implement page tracking with analytics.js
<!– Google Analytics –>
ga(‘create’, ‘UA-XXXXX-Y’, ‘auto’);
<!– End Google Analytics –>
You need to add the above code to your website’s templates in order to start using the analytics.js. This code needs to be added before the closing head tag (</head>) and you need to replace the string “UA-XXXXX-Y” with the property ID of the Google Analytics property you wish to track. The property ID is also called tracking ID.
When the send command is executed, the title and location fields stored on the tracker get sent and Google Analytics uses those values to show which page your users visited.
The Ecommerce Tracking allows you to track the number of transactions and revenue that your website generates. When a user clicks on the purchase button, the user’s purchase information is sent to the web-server that carries out the transaction. If it is a success, the web-server replies with a thank you or a receipt page. In short, ecommerce tracking will let you know the types of customers that make purchases and what they’ve purchased.
To view ecommerce data in analytics, you need to perform the following two simple steps.
1) Enable Ecommerce in your reports
2) Add code to your site or to collect ecommerce data
Let’s see each steps in detail.
Enable ecommerce in your reports
This is the primary setup you need to perform in order to implement ecommerce tracking. To enable ecommerce in your reports, you need to perform the following steps.
1) Sign into your Analytics account
2) Navigate to the desired account, property and view
3) In the VIEW column, select Ecommerce Settings.
4) Click the Enable Ecommerce toggle ON.
5) Optional: Click the Enable Related Products toggle ON.
6) Click Next step
7) Click Submit
These are the steps you need to enable ecommerce in your reports.
Add code to your website or to collect ecommerce data
Now, the next step is adding code to the website or application in question to collect ecommerce data. This can be done with the help of a web developer unless you can do it yourself.
These are the steps to enable ecommerce tracking in your website.
If you need any further assistance please contact our support department.