I just saw an other forum post in the osCommerce forum, asking how to add google analytics to a osCommerce store. Adding google analytics to your osCommerce store became in version 2.3.1 a very easy process. There are no files to edit or any code to add to anywhere. All you have to do is to install the module in your administration panel.
Let’s take things from the beginning and step by step, there are actually just to steps to do
1 Get your code from google
First please go to the google analytics website. In case you don’t have a google analytics account, you will need to create one, if you have, just login.
Second step is to create an account and a profile for the website you want to start tracking, your store in this case. The instructions about how to do that are very detailed on the google website, so there is no reason to repeat this here. The screen you will face will look like this
You could also create just a new “profile” in case your store is just a pert of your complete website, this depends on how you want your data to be grouped and displayed
Important to start tracking your store is to get the unique tracking number, that looks like this
The number we need is the one that start with UA- in the image above. Please do not use the number on the image here, you will get your own number from google. In case you want to add “ecommerce tracking”, press on edit on the right hand side of your profile line and enable it from there
2 Install the google analytics module
Now, after we have the google analytics number, lets add it to our osCommerce store. We need to login to the administration panel and then click on modules>header tags and install on the top right corner. They may be several modules available for installation, the one we need is called, how else, “google analytics”. Install it
Last step is to add the google number to the module and to enable ecommerce tracking in case we have it enabled at google too.