If you're using a third-party conversion or sales tracking system to report on your store's sales activity, such as Facebook Pixel, you may be required to insert some custom web scripts into a portion of your store. Fortunately, there's a placeholder in your store's Admin Area designed specifically for this purpose!

Editing Article 130

To add third-party conversion tracking code, such as Facebook pixel or Google Analytics tracking scripts, edit article ID # 130 as follows:

  1. From your Admin Area, go to Design > Site Content.
  2. Scroll down until you find Article ID # 130. If this article doesn't exist in your store, or if it exists but does not have the Spot Key set to ROI_Javascripts, click View List at the top of the page and use Search to find an article with ROI_Javascripts in the Spot Key field.
  3. Click the article ID number.
  4. In the Article Body field, click the HTML icon in the Easy Editor toolbar.
  5. Enter or paste the following script into the Article Body field and click Save.

Once the tracking script has been saved in the article body, it will populate throughout your store and you'll be able to use any relevant conversion analytics. 

Note

By default, this article will be empty. However, if you need to allocate space in this article body for additional HTML, text, or other web scripts, you may do so. This article is specifically designed for use with ROI tracking scripts, but is not exclusive for their use.

Examples 

The Facebook Pixel code will look similar to the example below:

<!-- Facebook Pixel Code -->
<script>
 !function(f,b,e,v,n,t,s)
 {if(f.fbq)return;n=f.fbq=function(){n.callMethod?
 n.callMethod.apply(n,arguments):n.queue.push(arguments)};
 if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
 n.queue=[];t=b.createElement(e);t.async=!0;
 t.src=v;s=b.getElementByTagName(e)[0];
 s.parentNode.insertBefore(t,s)}(window,
 document,'script','https://connect.facebook.net/en_US/
 fbevents.js');

 fbq('init', '1234567890');
 fbq('track', 'PageView');
</script>
<noscript>
 <img height="1" width="1" style="display:none"
 src="https://www.facebook.com/tr?id=1234567890&
 ev=PageView&noscript=1"/>
</noscript>
<!-- End Facebook Pixel Code -->

 For more information on Facebook pixel, see Facebook's documentation.

The Google Analytics tracking script will look similar to the example below:

<!-- BEGIN GOOGLE ANALYTICS ECOMMERCE TRACKING SCRIPT (INSERT IN ARTICLE 130) -->
<script type="text/javascript">
 try {
 if( typeof Order != 'undefined' ) {
 ga('require', 'ecommerce', 'ecommerce.js');
 ga('ecommerce:addTransaction', {
 'id': Order[0], // order ID - required
 'affiliation': 'Volusion Shopping Cart', // affiliation or store name
 'revenue': Order[2], // total - required
 'tax': Order[4], // tax
 'shipping': Order[5], // shipping
 'city' : Order[6]
 });
 for (var i=0; i < OrderDetails.length; i++){ //for each product
 ga('ecommerce:addItem', {
 id: OrderDetails[i][0]
 , name: OrderDetails[i][3]
 , sku: OrderDetails[i][2]
 , price: OrderDetails[i][5]
 , quantity: OrderDetails[i][6]
 });
 }
 ga('ecommerce:send');
 }
 }
 catch(e) {}
</script>

Please note that in order for the Google Analytics Conversion Tracking script to function, you'll also need to enable Ecommerce within your Google Analytics account. To do so, log in to Google Analytics and navigate to your domain's Admin > View > Ecommerce Tracking section. Make sure the Ecommerce Tracking status is set to On.

For more information regarding Google Analytics integration with your store, please see Setting Up Google Analytics.

Conversion Tracking vs. Analytics

Note that the steps outlined above refer to the use of third-party ROI tracking scripts to measure your store's conversion data - the rate at which unique visits to your store are converted into sales. When using more robust web analytic systems such as Google Analytics that track data globally throughout your website, you'll need to follow a different set of instructions to integrate these analytics scripts with your store.

Generating Your Own Tracking Scripts

In most cases, your ROI tracking service will provide some form of scripts (generally JavaScript) for you to include in your site. However, there are some advanced functions that will allow you to create your own custom JavaScript for the purpose of customized ROI tracking integration.

The following notes on creating tracking scripts are intended for advanced users familiar with ROI tracking systems and JavaScript programming.

Please note that Volusion supports HTML, CSS, JavaScript, and ASP web code (where available). PHP and other scripting languages are not supported.

Where Order-Specific Information is Generated

Order-specific information can be generated by JavaScript on the OrderFinished.asp page within Volusion. Two JavaScript arrays will be initialized that you may need to be aware of:

Order Array Contents

  • Order[0] = Order ID
  • Order[1] = Unused
  • Order[2] = Payment Amount
  • Order[3] = Affiliate Commissionable Value
  • Order[4] = Sales Tax
  • Order[5] = Total Shipping Cost
  • Order[6] = Billing City
  • Order[7] = Billing State
  • Order[8] = Billing Country
  • Order[9] = Email Address

OrderDetails Array Contents

  • OrderDetails[X][0] = Order ID
  • OrderDetails[X][1] = Order Detail ID
  • OrderDetails[X][2] = Product Code
  • OrderDetails[X][3] = Product Name
  • OrderDetails[X][5] = Product Price
  • OrderDetails[X][6] = Quantity

Note that in the above example, [X] refers to an OrderDetail line item number (beginning from zero). There may be multiple OrderDetails arrays - one for each unique item contained within an order.

If you need to install a custom or third-party web script into your store, see "How to Install a Third-Party JavaScript".

Did this answer your question?