Volusion

A guide to implement Criteo solutions in Volusion.

Overview

This tutorial will explain how to generate Google Shopping Feed and install Criteo OneTag on your Volusion site.

[[disclaimer-nonplugin]]

Feed

Please provide your Criteo contact with a Google Shopping Feed URL. You can find instructions from Volusion here or build your own matching the Criteo Feed Specification

Tags

Add the tag code to your store

  1. Go to DESIGN > File Editor

File Editor

  1. Click on the template theme file

theme file

  1. Copy & paste the following tag code at the end the file, right before the closing tag:

body tags

Copy & Paste Code

<script type="text/javascript" src="//static.criteo.net/js/ld/ld.js" async="true"></script>
<script type="text/javascript">
var deviceType= /iPad/.test(navigator.userAgent)?"t":/Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|Silk/.test(navigator.userAgent)?"m":"d";
var accountID = {{accountid}};
var homepageDomain = '';
window.criteo_q = window.criteo_q || [];
window.criteo_q.push(
  { event: "manualFlush"},
  { event: "setAccount", account: accountID},
  { event: "setSiteType", type: deviceType});

switch(PageName())
  {
    case 'default.asp':
        {
           window.criteo_q.push({event: "viewHome", ecpplugin: "volusion"},{event: "flushEvents"});
        }
    break;
    case 'productdetails.asp':
        var product_ID = global_Current_ProductCode;
        {
           window.criteo_q.push({event: "viewItem", ecpplugin: "volusion", item: product_ID},{event: "flushEvents"});
        }
    break;
    case 'searchresults.asp':
      var itemList = [];
        $('.productnamecolor').each(function(){
            var item = ($(this).attr("href").split("/")[4].split(".")[0]);
                itemList.push(item);
              });
            var product_IDList= itemList.slice(0,3);
              {
                 window.criteo_q.push({event: "viewList", ecpplugin: "volusion", item: product_IDList},{event: "flushEvents"});
              }
    break;
    case 'shoppingcart.asp':
        var BasketList = [];
        $.getJSON('/ajaxcart.asp?cachebust='+Date.now(), function (data) {
           for(i=0;i<data.Products.length;i++)
              BasketList.push({id: data.Products[i].ProductCode, price: (data.Products[i].ProductPrice.split('$')[1].replace(" Inc GST",""))/(data.Products[i].Quantity), quantity: data.Products[i].Quantity});
         window.criteo_q.push({event: "viewBasket", ecpplugin: "volusion", item: BasketList},{event: "flushEvents"});
         });
    break;
    case 'orderfinished.asp':
    var productArray = [];
            var arrayLength = OrderDetails.length-1;
                for (var i = 0; i <= arrayLength; i++) {
                    var productId = OrderDetails[i][2];
                    var itemPrice = OrderDetails[i][5];
                    var itemQty = OrderDetails[i][6];

                    var item = {id: productId, price: itemPrice, quantity: itemQty};
                        productArray.push(item);
                }
          window.criteo_q.push({event: "trackTransaction", ecpplugin: "volusion", id: Order[0],item: productArray},{event: "setEmail", email: Order[9]},{event: "flushEvents"});

    break;
    default:
    {
       window.criteo_q.push({event: "viewHome", ecpplugin: "volusion"},{event: "flushEvents"});
    }
}
</script>

Verification

[[accurate]]