Skip to content
This repository has been archived by the owner on Jul 12, 2024. It is now read-only.

Using Google's Universal Analytics with Web Store

James Pickard edited this page Jun 25, 2015 · 1 revision

New Admin Panel Option

We have introduced a new option in the 3.2.9 Admin Panel to enable Google's new tracking library (Universal Analytics) for Web Store. New Admin Panel Toggle

Customers who were using the Classic library (a.k.a Asynchronous or Classic Google Analytics) must transfer their properties to Google Universal Analytics before enabling the Universal Analytics option in the Admin Panel to ensure that their Web Stores continue to be tracked properly.

To transfer your property to Universal Analytics, go to Google's Upgrade Guide and perform Step 1: Transfer a Property to Universal Analytics.

NOTE: As you go through the steps, if you do NOT see an option to click Universal Analytics Upgrade, then your property was automatically upgraded by Google and you need not do anything else within your analytics account.

Update Custom Themes

If your Web Store is running a custom theme and you wish to use the new Universal Analytics you may need to make the following code changes.

In your theme folder, find the file _head.php in the folder views/sites. If you do not have this file, you can ignore the change required here. If you do have this file, look for the line,

<?php $this->renderPartial('/site/_google'); ?>

and change it to,

<?php $this->widget('ext.wsgoogle.wspageviews'); ?>

Now locate the file receipt.php in the folder views/checkout. If you do not have this file, ignore the change required. If you do have this file, look for the line,

<?php echo $this->renderPartial('/cart/_googleconversion',array('model'=>$model),true); ?>

and change it to,

<?php $this->widget('ext.wsgoogle.wsecommerce', array('objCart' => $model)); ?>

Once your property is upgraded and the files in your custom theme (if you have one) have been updated you can enable the option in Web Store!

Clone this wiki locally