This is a snippet of JS code, that allows to view Voog E-commerce purchases in Google Analytics. It supports Google Tag Manager and standalone Google Analytics
-
Set up Google Analytics on your site.
-
Enable E-commerce in your Google Analytics settings. The code does currently not support the enhanced version
-
Include the appropriate JS file.
-
Download
voog-gacommerce-standalone.js
and upload it to your scripts folder in the Voog code editor. -
In
Settings
->Site
, add the following snippet inside the already present Google Analytics script tag under External stats, afterga('send', 'pageview');
. This makes sure the snippet loads after Google Analytics is ready.var s = document.createElement( 'script' ); s.setAttribute( 'src', '/javascripts/voog-gacommerce-standalone.js' ); document.body.appendChild(s);
- Create a Universal Analytics tag and set the Track Type to Transaction.
- Configure your tag with the required fields.
- Set your trigger as a
Custom Event
with the name ofvoog-gacommerce-send
. This is critical. - Publish the tag.
- Download
voog-gacommerce-tagmanager.js
and upload it to your scripts folder in the Voog code editor. - Include this file in
Settings
->Site
, in the part that inserts content before the</body>
tag.<script src="/javascripts/voog-gacommerce-tagmanager.js"></script>
-
Note: All categories show up as "Store product", since Voog does not have categories.