InMotion Hosting Support Center

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.

  1. Once you have your Google Analytics code log into your OpenCart Dashboard
  2. Go to System > Settings
  3. Choose your store and click “edit
  4. Go to the server tab and scroll to the bottom
  5. 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
  6. 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.

Continued Education in Course OpenCart
You are viewing Section 34: 300: Adding the Google Analytics code to OpenCart
Section 33: 302: Dealing with Returned Orders in OpenCart
Section 35: 306: Selling Gift Vouchers on your OpenCart Website

Support Center Login

Social Media Login

Social Login Joomla

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question
n/a Points
2014-07-22 1:25 pm
You do not need to improve this article. It is brilliant and extremely useful. Thank you.
n/a Points
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".

Thank you.

n/a Points
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!!
n/a Points
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

28,417 Points
2014-09-03 5:54 pm
Hello Laarnibebe,

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.
n/a Points
2014-10-26 2:48 pm

Thanks a million.

n/a Points
2015-02-04 8:51 pm

Hi There,

So pasting the google analytics code into the text box will apply google analytics to the entire website? 


On the Google analytics page it says "This is your tracking code. Copy and paste it into the code of every page you want to track."

19,934 Points
2015-02-05 12:34 pm
Hello Alex,

Thank you for your comment. For many Content Managment Systems (CMS), you will just have to add the Google code to the Dashboard, or use a plugin. It will then add the code to the pages.

Since OpenCart is built in PHP (like many CMS's), most of the pages are created dynamically. Meaning they are generated as needed, and there is no "static" page to add a tracking code to.

If you have any further questions, feel free to post them below.

Thank you,
n/a Points
2015-03-04 8:02 am

I am using OC1.5.6 and I have inserted my GA code in the server tab section, unfortunately Google tells me there is a missing tracking code -> No valid tracking code found for property.

28,417 Points
2015-03-04 12:12 pm
Hello Pal,

Sorry for the problems with the Google Analytics. Apparently, the problem has also been seen by other OpenCart users. They posted a solution here. There is also a plugin that could make this easier as well. The plugin can be found here.

Arnel C.
n/a Points
2015-03-17 10:17 pm

Hi Arnel

I realised my mistake?!! I just pasted the tracking id not the whole code! no wonder it wasnt picking up. It should work now.


Thanks for your feedback as well. appreciated




n/a Points
2015-04-12 11:07 am

Hi buddies,

This is a very simple and easy way to add the google analytics code to opencart and i just did it all like discribed, however when i was thinking that it was simple and fast google comes with "Status: Tracking Not Installed

Last checked: Apr 12, 2015 7:07:37 AM PDT
The Google Analytics tracking code has not been detected on your website's home page. For Analytics to function, you or your web administrator must add the code to each page of your website."
What can be wrong and what to do?
Thanks in advance,
31,565 Points
2015-04-13 1:18 pm
Hello Vitor,

This seems to be an issue with OpenCart. Arnel mentioned above that there is a thread with a solution for this. Try that and see if that helps. He also provided a link to a plugin that may also help.

Kindest Regards,
Scott M

Post a Comment

Email Address:
Phone Number:

Please note: Your name and comment will be displayed, but we will not show your email address.

13 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?


Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail:
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!