Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

Add Google Analytics to Your OpenCart Store

This guide shows how to connect Google Analytics to OpenCart so you can see how many people visit your store.

Online Stores2 min read20 steps

What is Google Analytics?

Google Analytics is a free tool from Google. It counts your visitors. It shows where they come from and which pages they like. It is like a people counter at a shop door.

To use it, you put a small piece of code on your site. This is called a tracking code.

Get your tracking code

  1. Go to the Google Analytics website and sign in with your Google account.
  2. Create an account and a property for your store if you have not yet.
  3. Open the admin settings and find the data stream or tracking code section.
  4. Copy the code snippet Google gives you. It is a short block of text starting with <script>.

Google changes its pages often. If the labels differ, look for words like "tracking code" or "install tag".

Add it to OpenCart (version 3)

  1. Log in to your OpenCart admin area.
  2. Click Extensions, then Extensions in the sub-menu.
  3. In the drop-down called Choose the extension type, pick Analytics.
  4. Find Google Analytics in the list. If it says not installed, click the green Install (plus) button first.
  5. Click the blue Edit (pencil) button.
  6. Paste your tracking code into the Google Analytics Code box.
  7. Set Status to Enabled.
  8. Click the blue Save button.

Add it to OpenCart (version 2)

  1. Click System, then Settings.
  2. Click Edit next to your store.
  3. Open the Server tab.
  4. Paste your code into the Google Analytics Code box.
  5. Click Save.

Check that it works

  1. Open your store in a new browser window.
  2. In Google Analytics, open the real-time report.
  3. You should see yourself as one active visitor. It can take a few minutes.
Tip: Only paste the code once. If your theme already has the code, you will count each visit twice.

Quick recap

  • Google Analytics counts and studies your visitors.
  • Copy the tracking code from your Google account.
  • In OpenCart 3, use Extensions, then Analytics. In version 2, use System, Settings, Server.
  • Paste the code, enable it and save.
  • Check the real-time report.