300: Adding the Google Analytics code to OpenCart
Google analytics provides in-depth data into who’s visiting your website and what they are doing once they are there. If you have not already set up a Google Analytics account, you’ll need to do so.
- Once you have your Google Analytics code log into your OpenCart Dashboard
- Go to System > Settings
- Choose your store and click “edit”
- Go to the server tab and scroll to the bottom
- Find the Category for Google Analytics Code and paste your code in the text box If you are not familiar how to get your Google Analytics code please see our article on Installing Google Analytics
- Click “Save”
You’ve now added Google Analytics to your OpenCart Website and Google can start collecting data about your website’s visitors. If you need further assistance please feel free to ask a question on our support center website.
‹Section 33: 302: Dealing with Returned Orders in OpenCart
›Section 35: 306: Selling Gift Vouchers on your OpenCart Website
We value your feedback!
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
new! - Enter your name and email address above and we will post your feedback in the comments on this page!
2014-07-22 1:25 pm
You do not need to improve this article. It is brilliant and extremely useful. Thank you.
2014-07-22 1:26 pm
I'm really new to building an online store and articles like these are so useful for a rookie like myself! I created a Google Analytics account and had no clue what to do after that (lol) so I searched for "where to add google analytics code in opencart" and this brilliant article was the 1st hit which I followed. I'm in the final stages of completing my website, and articles like these save me so much time which I can use to finalise my website instead of figuring out "code".
2014-08-04 8:40 pm
No improvement needed. This was the best, most straight-forward instruction and I was able to do it minutes. Thank you so much!!
2014-09-03 5:15 pm
Why cant I install Google Analytics in my site.It keeps on diverting me to error pagethat says:
You don't have permission to access /admin/index.php on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request
2014-09-03 5:54 pm
Sorry to hear that you are having a problem with the Google Analytics installation. Usually, when you see an error of this nature it means that the directory (or folder) mentioned in the error has a permission setting that does not allow you to make that change. This could also be a server security rule. You will need to check permissions for that folder and/or consult with your server support team in order to determine why you cannot install the module.