Our site www.viart.com site is operated by latest Viart Shop 5 with default Clear design
ViArt User's Guide (Version 3.6)
Please, see the list of all new features and fixed bugs that were made to all ViArt PHP Shopping Cart releases from version 2.1.1 up to the latest 3.5 version.
22.2. Google Tracking Code
22.2. Google Tracking Code
Prev Index Next

This tutorial covers the following sections:

Back to top

Overview

Google Analytics (or GA for short) is a free service offered by Google company that provides detailed reports about traffic (visits) to your website.

Back to top

How to get Google Analytics code

To enable Google Analytics you must first set up an account with them and get your personalized Google Analytics account number (in the format UA-XXXXXX-X) which is to be inserted in your ViArt shopping cart then.

Please, sign up for Google Analytics account and get your code following the instructions described here. Once this is done you can go to your ViArt Shop to enable Google Analytics.

Back to top

Where to find the settings

Google Analytics is enabled via Administration > System > Global Settings > Tracking Settings section.

Back to top

How to enable Google Analytics

Google analytics is built in ViArt Shop. You just have to provide your Google Analytics ID and viart will start the tracking:

1. Log in to your Administration console.

2. Navigate to Administration > System > Global Settings > Scroll down to "Tracking Settings" section. You will be presented with the following screen:



3. Turn on Google analytics tracking and enter your 'UA-xxxxx-x ' code provided by Google Analytics.

Important: Once you enable Google Analytics in your ViArt Shop then it automatically enables a full ecommerce tracking as well. On the final order page when a customer has paid and the order status is set to Paid the data is recorded, if the order status is not set to Paid it assumes the order was not finished and the data is not passed on to Google. You can open the file 'order_final.html' (for example) and find the google tracking ecommerce code starting from 'pageTracker._addItem('.

4. To check whether Google Analytics is enabled open your homepage, right click on the mouse and select to view a source code. Scroll the page down and your Google Analytics code should be there:



Back to top

Frequently Asked Questions

How to check Google Analytics is there?

When you look at the page source of your home page it will be all the way to the bottom. Do a search for "getTracker" and you should see your Google Analytics tracker code on that found line.

When I turn on Google Analytics and install the tracking code, I get all pages loaded with errors and with this text down left: "; urchinTracker();

The page errors are:

Line: 574

Char: 2

Error: '_gat' is undefined

There is no need to install Google Analytics as it is already built in the script. To use tracking code you should only specify UA-xxxxx-x at Administration > System > Global Settings.

I would like to change the old google analytics code to the newer version of Google Analytics Code. How do I do that?

You may find (and change) this code in the header.php and the footer.php files.

I've enabled Google Analytics via Administration > System > Global Settings, but the code is not shown. What can be the reason?

Please ensure that you haven't accidentally removed the code for GA from your 'footer.html' file. The code is as follows:

Where can I view my site's performance once Google Analytics is turned on in my ViArt Shop'

To view the statistics of your traffic please log in to Google Analytics, find a section called Website Profiles (in the center of the page) and click 'View Reports' to the right of the name of your site. This will bring you to the Dashboard where at the top of the page is a chart that gives a visual representation of your site traffic.

Prev Index Next