Notice: Trying to get property of non-object in /var/www/html/yellopen/catalog/model/magikblog/article.php on line 307Notice: Trying to get property of non-object in /var/www/html/yellopen/catalog/model/magikblog/article.php on line 296 How to configure Google Analytics with OpenCart

How to configure Google Analytics with OpenCart

Google Analytics is a free Web Analytics service that provides statistics and basic analytical tools for search engine optimization (SEO) and marketing purposes. The service is available to anyone with a Google account. Google Analytics lets you analyze data from all touchpoints in one place, for a deeper understanding of statistics about your website's traffic and traffic sources including site referrals, traffic sources and measure conversions of your campaigns.

Google Analytics works via a Google Analytics Tracking code which can be obtained from your Google Analytics Dashboard following the instructions in the official knowledgebase article. To start collecting stats via the Google Analytics the tracking code needs to be implemented on every page of your OpenCart website. If you do not have a Google Analytics account yet, you can sign up for free via the Official Google Analytics site.

 When you have an active Google Analytics account and you have obtained your Tracking code login your OpenCart admin dashboard and navigate to the Extensions section via the main navigation menu & follow the steps below -

Step 1: Go to Admin > Extensions 

Step 2 : Click on edit icon in front of your store.

Step 3 :  Paste the Google Analytics Tracking code into the field & enable the module save your settings via the Save icon at the top right corner of your screen.

Step 4 : Use Control/Command+U hotkeys to check the page source code. The google analytics snippet should appear before the closing tag of the page head section as shown below

  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),

  ga('create', 'UA-XXXXXXX-Y', 'auto');
  ga('send', 'pageview');


Step 5 : Proceed to Google Analytics Account in order to track your site statistics like website's traffic and traffic sources. 

If you are looking for updating your OpenCart themes, browse our collection curated from the best around the web. You can also request a customized OpenCart theme from Yellopen. And if you had facing a problem, then simply let us know here.