Volusion

Configure Rejoiner Scripts for Volusion

πŸ“˜

Make sure to replace YOUR_SITE_ID and YOUR_DOMAIN_NAME with your site's corresponding values when pasting these code snippets into your templates.

  1. From your Volusion Admin Panel, navigate to Design > Site Content.

  2. Scroll down to Article 117 ShoppingCart.asp, and click on the β€œ117.” After filling in your Rejoiner Site ID and domain, paste the code below into the article using the code </> view.

<script type="text/javascript">
var rejoinerAcct = {
  siteId: 'YOUR_SITE_ID',
  domain: 'YOUR_DOMAIN_NAME',
};

var _rejoiner = _rejoiner || [];
_rejoiner.push(['setAccount', rejoinerAcct.siteId]);
_rejoiner.push(['setDomain', rejoinerAcct.domain]);
(function () {
  var s = document.createElement('script'); s.type = 'text/javascript';
  s.async = true; s.src = 'https://cdn.rejoiner.com/js/v4/rj2.lib.js';
  var x = document.getElementsByTagName('script')[0];
  x.parentNode.insertBefore(s, x);
})();

$.post('/AjaxCart.asp', function (data) {
  if (data && data.Products && data.Products.length) {
    var cartTotal = +(data.Totals[0].CartTotal.replace(/[$,]+/g, ''));
    _rejoiner.push(['setCartData', {
      cart_value: Math.ceil(100 * cartTotal),
      cart_item_count: +data.Products.length,
    }]);
    $.each(data.Products, function (i, p) {
      var ix = p.ProductIndex, unitPrice = 0;
      unitPrice = +(p.ProductPrice.replace(/[$,]+/g, '')) / p.Quantity;
      _rejoiner.push(['setCartItem', {
        product_id: p.ProductCode,
        name: p.ProductName,
        price: Math.ceil(100 * unitPrice),
        item_qty: +p.Quantity,
        qty_price: Math.ceil(100 * (unitPrice * p.Quantity)),
        image_url: location.origin + '/v/vspfiles/photos/' + p.ProductCode + '-2T.jpg',
      }]);
    });
  }
}, 'json');
</script>
  1. Find Article 116 one-page_checkout.asp, and paste the code below into the </html> view.
<script type='text/javascript'>
var rejoinerAcct = {
  siteId: 'YOUR_SITE_ID',
  domain: 'YOUR_DOMAIN_NAME',
};

var _rejoiner = _rejoiner || [];
_rejoiner.push(['setAccount', rejoinerAcct.siteId]);
_rejoiner.push(['setDomain', rejoinerAcct.domain]);
(function () {
  var s = document.createElement('script'); s.type = 'text/javascript';
  s.async = true; s.src = 'https://cdn.rejoiner.com/js/v4/rj2.lib.js';
  var x = document.getElementsByTagName('script')[0];
  x.parentNode.insertBefore(s, x);
})();
</script>
  1. Find Article 130, ROI JavaScripts and paste the code below into the </html> view.
<script type='text/javascript'>
var rejoinerAcct = {
  siteId: 'YOUR_SITE_ID',
  domain: 'YOUR_DOMAIN_NAME',
};

var _rejoiner = _rejoiner || [];
_rejoiner.push(['setAccount', rejoinerAcct.siteId]);
_rejoiner.push(['setDomain', rejoinerAcct.domain]);
_rejoiner.push(['sendConversion']);
(function () {
  var s = document.createElement('script'); s.type = 'text/javascript';
  s.async = true; s.src = 'https://cdn.rejoiner.com/js/v4/rj2.lib.js';
  var x = document.getElementsByTagName('script')[0];
  x.parentNode.insertBefore(s, x);
})();
</script>
  1. From your Volusion Admin Panel, navigate to Design > Themes.

  2. Under Active Template > Advanced Editing, click Edit HTML.

  1. The template file may look different for your theme. Find the </head> tag.

  1. Insert the following snippet just before the </head> tag.
<script type='text/javascript'>
var rejoinerAcct = {
  siteId: 'YOUR_SITE_ID',
  domain: 'YOUR_DOMAIN_NAME',
};

var _rejoiner = _rejoiner || [];
_rejoiner.push(['setAccount', rejoinerAcct.siteId]);
_rejoiner.push(['setDomain', rejoinerAcct.domain]);
(function () {
  var s = document.createElement('script'); s.type = 'text/javascript';
  s.async = true; s.src = 'https://cdn.rejoiner.com/js/v4/rj2.lib.js';
  var x = document.getElementsByTagName('script')[0];
  x.parentNode.insertBefore(s, x);
})();
</script>
  1. Make sure to SAVE the template file!