Google Analytics is a service offered by Google that generates detailed statistics about a website's traffic and traffic sources and measures conversions and sales. You can connect your Google Analytics to your store and thus receive statistics on your store activity as well.
- Register a new GA account if you don't have one.
- Add your site.
- Get your Web property ID. How to do it: http://support.google.com/analytics/bin/answer.py?answer=1032385
- Enter this ID on the Control Panel → Settings → General →Tracking & Analytics page, "Google Analytics Id" option. Save the changes.
- Then please enable the "Ecommerce tracking" option in your GA settings. Please refer to these help articles for details: support.google.com/analytics/bin/answer.py?answer=1037249 and support.google.com/analytics/bin/answer.py?hl=en&answer=1009612&topic=1037061 Important note: you don't need to modify the tracking code to enable this feature, you should just enable it in the Google Analytics backend.
All product pages are dynamic and generated on the fly. A page isn't refreshed, Online store just updates the HTML code on the page. It allows loading new pages really fast.
The traditional way to track pages is to add some JS code to the page code which is executed each time you load a page and tracks your hit. If you try to use this traditional way with Online store, you will see that your browser will load your page just ONCE and all the other clicks in your store won't cause page reloading, and the result doesn't generate a hit. So your customer will open your store and see 100 products, but the stats will show only 1 view.
In order to overcome this limitation, we use Google Analytics API to emulate page loads. When you open a dynamic product page, Online store sends a special JS request to Google Analytics saying that a new product page was opened. This way allows getting the exact number of views of your AJAX pages. That is why it's necessary to set up GA in your back-end to get the exact stats.
Since Online store emulates page loading, the "virtual" pages appear in your Google Analytics back-end. What it means: the Online store pages and links you see in the GA back-end don't point to actual pages. However each "virtual" page corresponds some real page in your store.
Here is the list of virtual pages generated by Online store:
- "/product/" + productId; (productId is a unique ID of a opened product)
- "/category/" + categoryId (categoryId is a unique ID of a opened category)
- "/search/" + keywords