This is inspired by a great post from Matt at One Take Media on installing Google Analytics on ProStores. Matt’s helpful post is great except that it’s a little outdated and uses the old Google tracking code and will not work if you are setting up a new site with a new Google username. Unfortunately this seems to be the official method and is even linked from the ProStores site as directions for setting up GA.
So I thought I would update Matt’s great post with the new tracking code and directions for using Google analytics with your ProStores site.
- Go to your page template manager in ProStores and create a baseline of your footer and confirmation page
- Remove any previously installed Google tracking code from your templates. If this is your first time installing your tracking code you don’t have to worry about this.
- Open your footer template and insert the tracking code from Google Analytics into your template. If you don’t have the new tracking code <click here> and cut and copy it (you must replace my UA-xxxxxxx-x with your unique UA from Google).
- Save and Publish.
- Open your order confirmation page template and paste the code in this file <click here> at the very end of the file (again you must replace my UA-xxxxxxx-x with your unique UA from Google).
- Save and Publish.
Now you must enable E-Commerce in Google Analytics.
- Log into your Google Analytics account and go to your website profiles. Click edit for the ProStores website we are working with.
- In section “Main Website Profile Information” click edit.
- Under the section for e-commerce select the radio button for “Yes, an E-Commerce Site” and save the changes!
You should be up and running in Google Analytics.
Now if you would like to learn how to setup goals and track your sales funnel for all step of the checkout process check out Matt’s post on
setting up goals with ProStores in Google Analytics (which is still up to date so I wont recreate it).
I will try and post a video of this content in the next few days.
If you found this info helpful please consider sharing it on Facebook, Twitter or subscribing to my feed! Thanks.
9 Responses to “Setting Up Google Analytics on ProStores”








Hi Roger.
Thank you for the mention and link back to my original post. More recently than that post I released an update to it using the most recent version of Google’s code in another blog post. I do see that the code linked in my original article is out of date and since people are still viewing I’ll be updating it in a few minutes.
Just a couple things to note:
1. In this post you leave off the ssml code that necessary to hide the non-sales code in the footer template when the order confirm template loads, due to the way ProStores works the code that is in footer template would also appear on the Order Confirm page and conflict with the Sales-Tracking Google Analytics code that will already be on the Order Confirm page. The proper code for the footer template would be:
do nothing
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'xx-xxxxxx-x']);
_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);
})();
2. I’ve attempted to do what you did with the Order Confirm code before, updating it to the Async version and it wouldn’t track sales anymore, so I reverted to the older version. Its possible that I missed something on my attempt. I’ll give it another shot soon.
I can confirm that I have the old code installed in several dozen sites and it is tracking sales even though it is a few versions behind.
Again, thank you for the link and the mention.
Matt Montgomery
One Take Media
Apparently the comment software stripped out the angle brackets, so I’m just adding a link to the updated code.
http://www.onetakemedia.net/blog/txt/gafooter.html
Thanks,
Matt
You are right, good eye on the missing SSML. I have added it to the post.
Also you are right the new GA code doesn’t work for the order confirm, strangely enough. Google doesn’t seem to have any info regarding that either. But I did get to lose a days worth of conversions data.
Thanks.
You’re welcome Roger.
I just need to have some time to dedicate to tackling that problem, but since it works in old and new sites I haven’t bothered. Now, I do keep a pretty close eye on google, as soon as they announce that they are phasing out the old code it’ll be come a priority I’m sure.
Matt
I have gotten the async tracking code configured correctly. the only tracking code was dropping products on orders with multiple products and only counting the first product. Here is the correct code:
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXXXXX-1']);
_gaq.push(['_trackPageview']);
_gaq.push(['_addTrans',
'', // order ID - required
'ENTER YOU SITE NAME HERE', // affiliation or store name
'', // total - required
'', // tax
'', // shipping
'', // city
'', // state or province
'' // country
]);
// add item might be called for every item in the shopping cart
// where your ecommerce engine loops through each item in the cart and
// prints out _addItem for each
_gaq.push(['_addItem',
'', // order ID - required
'', // SKU/code - required
'', // product name
'', // category or variation
'', // unit price - required
'' // quantity - required
]);
_gaq.push(['_trackTrans']); //submits transaction to the Analytics servers
(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);
})();