Booqable

When you need to plan rentals, receive online orders, keep track of inventory, accept payments, view product availability, send out invoices, and more, Booqable has you covered.

To integrate your Booqable store login to its admin panel and navigate to Settings> Online checkout> Additional scripts.

Code

The sale tracking code to be used in Additional scripts section:

(function(d,t) {
    var script = d.createElement(t); script.id= 'pap_x2s6df8d'; script.async = true;
    script.src = 'URL_TO_PostAffiliatePro/scripts/trackjs.js';
    script.onload = script.onreadystatechange = function() {
      var rs = this.readyState; if (rs && (rs != 'complete') && (rs != 'loaded')) return;
    };
    d.getElementsByTagName('body')[0].appendChild(script);
  })(document, 'script');


function papSale(totalCents, orderId, data1) {
  PostAffTracker.setAccountId('Account_ID');
  var sale = PostAffTracker.createSale();
    sale.setTotalCost(totalCents/100);
    sale.setOrderID(orderId);
    sale.setData1(data1);
    PostAffTracker.register();
}

setTimeout(function(){
   // Booqable completed event
    Booqable.on('completed', function (e) {
        var state = store.getState();
        var cart = state.orm.carts.getById(state.checkout.cartId);
        var subtotal = Number(cart.price_in_cents);
        var discount = Number(cart.coupon_discount_in_cents);
        papSale(subtotal-discount, cart.created_at + '('+cart.id+')', state.form.CheckoutForm.email.value);
    });

}, 2500);

That's it. The store has been integrated. Do not forget to integrate your site with the click tracking code.