To run an ecommerce website successfully it is important that to know the consumer trend. It is equally important to know the kind of products people buy from your site, the geographical location of the consumers etc. Google Analytics is one of the most trusted analytical tools ecommerce sites use for assessing consumer behavior on a website. The study on a website’s impact helps ecommerce business study their ROI too and accordingly chart out their future plans. On the other hand, for developing and maintaining an ecommerce website, Magento is the most trusted and widely used content management system. When Google Analytics and Magento are brought together, it is not surprising that the result is great.
Installing Google Analytics on Magento
To install Google Analytics on Magento, there are a few simple steps that need to be followed :
Remember that Magento supports two types of tracking: page view tracking and ecommerce tracking.
Customize Google Analytics to extract maximum benefit
Installing Google Analytics to Magento is not sufficient to get the best results. If you can modify Google Analytics you can be ensured that you get better results. Before you start modify the codes to get better results, it is very important that you remember that in Magento you cannot overwrite core files as this will stop you from future updates. Google Analytics is a core file and you need to know the right process to make the changes.
Ga.php is one of the files that controls some of the tracking codes and you can modify a few things here to get better results. Ga.php can be found following this route: \app\code\core\Mage\GoogleAnalytics\Block\.
Furthermore, in order to get better results, you can also modify the template file which can be found following the route: \app\design\frontend\base\default\template\googleanalytics\. Here you will reach the ga.phtml file and here you can place the template you will use for Magento.
Apart from modifying the GA View, you can also modify the customer group, 404 page tracking, category report etc. to modify the customer group, the following code can be incorporated :
<;;?php //get customer group if(Mage::getSingleton('customer/session')->;;isLoggedIn()){ // Get group Id $groupId = Mage::getSingleton('customer/session')->;;getCustomerGroupId(); //Get customer Group name $group = Mage::getModel('customer/group')->;;load($groupId); $groupname=$group->;;getCode(); } else {$groupname= &quot;Guest&quot;;} ?>;; Modifying the 404 page tracking codes will help you know the kind of pages that lead to the 404 error.to view this, you can check the following code set :
//This code helps you get a title in Magento $GTitle=$this->;;getLayout()->;;getBlock('head')->;;getTitle(); This post is contributed by PixelCrayons, a web development firm that specializes in custom eCommerce Web Development. You may hire developers here for Magento Development and Ubercart development.