technology and software

How To Install Google Analytics Ecommerce Tracking On Volusion

Measure Revenue, Transactions Generated on Website

Capturing Ecommerce Data On Your Volusion Website

So your Volusion store is all set up and you want to measure the revenue and transactions that your website generates. To get this information, you will need to implement the analytics.js JavaScript snippet on your website so that it can send information to Google Analytics.

To break things down, there are two types of ecommerce data that you can send using analytics.js: transaction data and item data.

Transaction data will give you information about your customers’ transactions including:

  • Transaction ID
  • Total revenue
  • Total shipping cost
  • Total tax charged

Item data will give you information about the individual products that a customer purchased. This includes:

  • Transaction ID
  • Item name
  • Item code or SKU
  • Item category
  • Item price (per individual unit)
  • Quantity of items purchased

Does this sound like the kind of information you wanted to gather? Great! Read on!

*Note: This guide covers the implementation of the Google Analytics ecommerce tracking for websites using Universal Analytics (analytics.js).

The Explanation

There are five steps and components associated with the Google Analytics ecommerce tracking code:

  • Load the Google Analytics Universal tracking code (gray snippet)
  • Load the ecommerce plugin (green snippet)
  • Capture transaction data (blue snippet)
  • Capture item data (purple snippet)
  • Send the data to Google Analytics (pink snippet)

When a customer successfully completes a purchase on your Volusion website, they are redirected to a “Thank You” page. If you enable ecommerce tracking and have the code on your “Thank You” page, the ecommerce data from the transaction will be sent to Google Analytics.

The Code

Below is the code required for ecommerce tracking for websites using Google’s Universal Analytics.

Before inserting this into website, substitute the red text for your own Google Analytics property tracking ID. Your property tracking ID can be found in the Admin panel of your Google Analytics under Property Settings.

*Note: if you already have Google Analytics installed on your Volusion website template, you do not need to include the gray snippet of code below.

The Step-by-Step

In Google Analytics:

    • Click on Admin
    • Under View, click Ecommerce Settings

Google Analytics Ecommerce Tracking - Step 1

    • Under Enable Ecommerce, click Edit and set the status to On*

Google Analytics Ecommerce Tracking - Step 2

  • Click the Submit button

* This tutorial does not cover Enhanced Ecommerce Settings. Leave this option off for now.

In your Volusion dashboard:

    • Hover over Design and click Site Content

Volusion Ecommerce Tracking - Step 1

    • Click on Article ID 130 (OrderFinished.asp)

Volusion Ecommerce Tracking - Step 2

    • Paste your ecommerce tracking code into the Article Body section of the OrderFinished.asp page

Volusion Ecommerce Tracking - Step 3

  • Click Save

Now you’re in monitoring mode. For the next few days, check the revenue columns in your Google Analytics as well as the Conversions > Ecommerce section to make sure your website data is flowing through correctly. To make sure the numbers are accurate, cross reference the revenue, purchased products, and transaction data in Google Analytics with the order information found in the back end of your Volusion website.

And that’s that!

Keep an eye out on the Vertical Rail blog for more posts about ecommerce analytics!
If there’s a topic you would like us to address in particular, or if you’re running into issues implementing the code, please comment below or fill out our contact form and we’ll be in touch!


References:
Volusion Support
Google Analytics: Ecommerce Tracking – Web Tracking (analytics.js)

Categories

Get Blog Updates

Reader Interactions

Comments

  1. Rob Garner says

    Thank you – this has been a HUGE help and saved me many hours of searching! I’d just like to add that when pasting the code, make sure it’s within the opening and closing script tags:

    …… code goes here

    PS There might also be other code there already, so this is important

    • says

      Hi Rob – you make a good point, thanks for your input. It’s important when adding a snippet of code from an outside source to the code of your website that you add the snippet in its entirety AND make any modifications that need to be made to personalize it to your site (such as your unique UA code.) Always be sure to read any accompanying directions – and only take code from reputable sources!

  2. Matthew says

    Hello! Thanks for this article! After discovering it this morning, I went through the steps, and after completing them, made a test purchase in my volusion store. It’s now about two hours laters and far nothing has shown — although general traffic to my site is being reported to GA — just no commerce. I looked at view source on the thank you page and confirmed the code is there. Is the comment above mine (from ‘Bar’) the new way to do it?

    Also why the hell doesn’t Volusion’s support site carry this information? Frustrating!

    • Matthew says

      Update: I figured it out!

      For anyone else who might be having my problem, in the Volusion template (a responsive template) I’m using, the GA code was at the bottom of the page, just above the tag. Therefore when the ‘Thank you page’ loaded, the ecommerce reporting script was process before it got to the main GA script. By cutting and pasting the main GA script to right below the tag, I am now seeing ecommerce in the Conversions section of my Google Analytics page.

      Thanks again for posting this. It pointed me in the right direction!

  3. Bar says

    after long time I got the right code and it should be INSERT IN ARTICLE 49

    var _gaq = _gaq || [];
    _gaq.push([‘_setAccount’, ‘UA-xxxxxxxx-x’]);
    _gaq.push([‘_trackPageview’]);
    _gaq.push([‘_addTrans’,
    Order[0], // transaction ID – required
    ‘American Blanket Company’, // affiliation or store name
    Order[2], // total – required
    Order[4], // tax
    Order[5], // shipping
    Order[6], // city
    Order[7], // state or province
    Order[8] // 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’,
    OrderDetails[0][0], // order ID – required
    OrderDetails[0][2], // SKU/code – required
    OrderDetails[0][3], // product name
    ‘–‘,
    OrderDetails[0][5], // unit price – required
    OrderDetails[0][6] // quantity – required
    ]);
    _gaq.push([‘_trackTrans’]); //submits transaction to the Analytics servers

    • Matthew says

      Bar, Are you saying that the original instructions in the article are incorrect and the code you’ve provided should be put in article 49 instead? I hope you see this and clarify, as I haven’t been able to make the original instructions work for me.

  4. says

    We track revenue through Doubleclick. Applying your logic above in your google analytics example. do you know how you would update a Doubleclick Floodlight tag to pass back revenue and order ID correctly? Below is our tag. any help here would be GREATLY appreciated

    <!–
    Start of DoubleClick Floodlight Tag: Please do not remove
    Activity name of this tag: Order Confirmation – State UK
    URL of the webpage where the tag is expected to be placed: https://www.statebicycle.co.uk/OrderFinished.asp?
    This tag must be placed between the and tags, as close as possible to the opening tag.
    Creation Date: 02/02/2015
    –>

  5. says

    Amazing that I found this helpful article.
    I noticed you left categories out of your code, and I see that categories is not listed on the support article you posted from Volusion. Any suggestion to put categories into the code?

  6. carlos says

    Hi,

    I don’t know why but the transaction numbers of volusion and google analytics are not the same. Some transactions are tracked and others not. Do you know if is there any issue?

    thank you

    • Linda Bateman says

      Carlos –

      Whereas this is frustrating, we know it is a common occurrence. We would need a LOT more information to try and get to the bottom of that… something you may not want to do in a forum.

  7. says

    I found that this code wasn’t working for me. After comparing my Volusion orders against GA ecommerce tracking, I found GA would only find about one transaction a month. Here is the code that I a trying out now to see if it works. If it works, I’ll report back.

    // <![CDATA[
    // Summary
    ga('require', 'ecommerce', 'ecommerce.js’)
    ga('ecommerce:addTransaction', {
    id: Order[0], // Order ID
    affiliation: ‘YOURSTORENAME', // Store name – Add yours
    revenue: Order[2], // Grand Total
    shipping: Order[5] , // Shipping Cost
    tax: Order[4] // Sales Tax
    });
    // Details
    for(var i=0;i

  8. says

    I am also having a problem getting the enhanced e-commerce tracking to code to work on our Volusion store. The code I used was combined from this article and another I found. See below:

    // <![CDATA[
    // Summary
    ga('require', 'ecommerce', 'ecommerce.js');
    ga('ecommerce:addTransaction', {
    id: Order[0], // Order ID
    affiliation: 'Moulder Services', // Store name – Add yours
    revenue: Order[2], // Grand Total
    shipping: Order[5] , // Shipping Cost
    tax: Order[4] // Sales Tax
    });
    // Details
    for(var i=0;i

    I’ve seen other articles and forums use a specific product example , so I’m a little confused how to implement ecomm tracking on our Volusion store’s admin area.

    Thank you in advance for any assistance with getting this to work correctly.

    • says

      The setup for enhanced ecommerce tracking is a little more involved but the transaction portion for Volusion would look something like this:


      ga('require', 'ec');
      //loop through all products being purchased
      for (var i=0; i < OrderDetails.length; i++) { ga('ec:addProduct', { 'id': OrderDetails[i][2], 'name': OrderDetails[i][3], 'price': OrderDetails[i][5], 'quantity': OrderDetails[i][6] }); } // Transaction level information is provided via an actionFieldObject. ga('ec:setAction', 'purchase', { 'id': Order[0], 'affiliation': 'Store Name', 'revenue': Order[2], 'tax': Order[4], 'shipping': Order[5] }); ga('send', 'pageview');

      Note that enhanced tracking will need to be enabled in Google Analytics and this tracking should not be used with the Universal or older style Analytics.

      More information and examples can be found here: https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce

  9. shumaila says

    not working on my client site
    google analytic is already installed on my client site and i am using following code in 130 article

    ga(‘require’, ‘ecommerce’);
    ga(‘ecommerce:addTransaction’, {
    ‘id’: Order[0], // Transaction ID. Required.
    ‘revenue’: Order[2], // Grand Total.
    ‘shipping’: Order[5], // Shipping.
    ‘tax’: Order[4] // Tax.
    });
    for (var i=0; i < OrderDetails.length; i++) {
    ga('ecommerce:addItem', {
    'id': OrderDetails[i][0], // Transaction ID. Required.
    'name': OrderDetails[i][3], // Product name. Required.
    'sku': OrderDetails[i][2], // SKU/code.
    'price': OrderDetails[i][5], // Unit price.
    'quantity': OrderDetails[i][6] // Quantity.
    });
    }
    ga('ecommerce:send');

    please help me if any one know where i did mistake

    • says

      Follow Up — Here is the code snippet from https://developers.google.com/analytics/devguides/collection/upgrade/reference/gajs-analyticsjs#ecommerce

      // addItem should be called for every item in the shopping cart.
      ga(‘ecommerce:addItem’, {
      ‘id’: ‘1234’, // Transaction ID. Required
      ‘name’: ‘T-Shirt’, // Product name. Required
      ‘sku’: ‘DD44’, // SKU/code
      ‘category’: ‘Green Medium’, // Category or variation
      ‘price’: ‘11.99’, // Unit price
      ‘quantity’: ‘1’ // Quantity
      });

      • says

        Hi Chad,

        So basically this means that we need to fill out the information (ID, name, sku, category, price, quantity) for every product we have available on the website? Do we need to input any coding on the individual product pages?

        Thanks for your help on this!

        Best,
        Sharon

        • says

          When this code is executed it will loop through all of the items that were purchased and add them to be sent to Google Analytics. “OrderDetails” stores this information during and after the checkout process. A full list of what information Volusion provides can be seen here at the bottom of the page. https://support.volusion.com/article/how-install-roi-tracking-conversion-code-your-site

          If you do not want to send some of the information you can remove it from the loop. You could also remove this entire section and just the basic order information will be passed (Order ID, Revenue, Shipping, Tax).


          for (var i=0; i < OrderDetails.length; i++) { ga('ecommerce:addItem', { 'id': OrderDetails[i][0], // Transaction ID. Required. 'name': OrderDetails[i][3], // Product name. Required. 'sku': OrderDetails[i][2], // SKU/code. 'price': OrderDetails[i][5], // Unit price. 'quantity': OrderDetails[i][6] // Quantity. }); }

          At a minimum if you include this section you must provide ID and Name.


          for (var i=0; i < OrderDetails.length; i++) { ga('ecommerce:addItem', { 'id': OrderDetails[i][0], // Transaction ID. Required. 'name': OrderDetails[i][3] // Product name. Required. }); }

    • says

      It looks like the single quote characters you are using in this section are not valid:


      ga(‘require’, ‘ecommerce’);
      ga(‘ecommerce:addTransaction’, {
      ‘id': Order[0], // Transaction ID. Required.
      ‘revenue': Order[2], // Grand Total.
      ‘shipping': Order[5], // Shipping.
      ‘tax': Order[4] // Tax.
      });

      The fix may be as simple as changing “‘” to “'”. The rest of your code looks fine, as long as Universal Analytics has already been loaded on the page.


      ga('require', 'ecommerce');
      ga('ecommerce:addTransaction', {
      'id': Order[0], // Transaction ID. Required.
      'revenue': Order[2], // Grand Total.
      'shipping': Order[5], // Shipping.
      'tax': Order[4] // Tax.
      });

  10. says

    It’s amazing how Volusion is unable to provide a guide like this when every single Volusion store needs to have revenue tracking. I’ve just added this to my store and hoping it works! Thank you!

  11. Bikas Shrestha says

    Thanks for this article.

    Could you please explain in detail that how you get the information of JavaScript variables like: Order[0] and OrderDetails[i][0] (which are being used on your above ga code) for Order Confirmation page? Is this something STANDARD variable in Order Confirmation page OR have we need to go through Order Confirmation page by placing some test order to trace such variables?
    Thanks.

    • Bikas Shrestha says

      Please ignore my previous thread. I actually didn’t notice your reference URLs, located on the last line of your article. I got my answer from that. :) BTW, this article helps me lot. Thanks. :)

Leave a Reply

Don't miss out!

Get our latest articles delivered straight to your inbox!

We have a strict NO SPAM policy.

We use cookies to enhance your experience. By continuing to visit this site, you agree to our use of cookies. Click here for more information.