Without analytics code osCommerceYou can track your osCommerce website statistics with Google analytics. osCommerce has a built in function that allows you to add Google Analytics code to your site. The image to the right shows what the code looks like before adding the Google Analytics code. Below are the steps to add your Google Analytics to your osCommerce website.

Note! You can get your Google Analytics code for free. Please see our article on Creating a Google Analytics Account.

Steps to add Google Analytics code

  1. Log into your osCommerce Admin dashboard.
  2. Go to the Header Tags osCommerceGo to Modules > Header Tags.
  3. Click Google analytics module osCommerceClick Google Analytics from the Modules list.
  4. Edit the module osCommerceClick the Edit button on the right hand side.
  5. Add code to the module osCommerceAdd the Google Analytics ID in the Google Analytics ID box.

    If you do not know how to get your ID you can get it from the code at Google. Your Google Analytics code should look similar to the code below. The XXXXX-Y indicates the property ID. osCommerce will need the whole ID like UA-XXXXX-Y.

    <script type="text/javascript">
    
      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-XXXXX-Y']);
      _gaq.push(['_trackPageview']);
    
      (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
      })();
    
    </script>

    Save the Changes.

    Google Analytics code in head section osCommerceosCommerce will create the Google Analytics code for you. Once you save the changes you will see the code in your head section like the snapshot to the right.

Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
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.
How did you find this article?
Please tell us how we can improve this article:
Email Address
Name

new! - Enter your name and email address above and we will post your feedback in the comments on this page!

Like this Article?

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
Submit

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

News / Announcements

WordPress wp-login.php brute force attack
Updated 2014-07-17 06:43 pm EST
Hits: 200907

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

Need more Help?

Search

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: support@InMotionHosting.com
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!