Carthook Code

In this Justuno Support article we will provide the code you can use with Carthook


After collaborating with Carthook, we updated the code to help ensure the initial click counts the conversion and only the initial click. At this time, it will not report on all upsells that happen after the initial submission. Please contact support@justuno if you have any questions.



Add the code below to the footer of the CartHook's Global Scripts section and ensure the thank you page receives this code as well. You will need to update the code below with your embed code id - This is the number that follows "ju_num=" in the embed code page. 



window.ju_num="Embed Code";window.asset_host='//';(function(i,s,o,g,r,a,m){i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)};a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script',asset_host+'vck.js','juapp');


   var ch_orderId = window.chData.order.carthook_order_id;

   var ch_shopifyOrderId = window.chData.order.order_id;

   if (ch_orderId && ch_orderId!='') {

     var ch_lastChargedLineItems = window.chData.order.last_charged_line_items;

     var ch_totalPrice = window.chData.order.total_price;

     var ch_subtotalPrice = window.chData.order.subtotal_price;

     var ch_transactionProducts = [];

     var ch_taxPrice = 0;

     for (var i = 0; i < ch_lastChargedLineItems.length; i++) {

         var ch_item = ch_lastChargedLineItems[i];


           'sku': ch_item.sku,

           'name': ch_item.title,

           'price': ch_item.price,

           'quantity': ch_item.quantity,


         if (ch_item.tax_amount) {

             ch_taxPrice += ch_item.tax_amount;



     var ch_shippingRates = window.chData.order.last_charged_shipping_rates;

     var ch_shippingTotal = 0;

     //Sum up shipping

     for (var i = 0; i < ch_shippingRates.length; i++) {

         ch_shippingTotal += parseFloat(ch_shippingRates[i].price);








     if (ch_transactionProducts.length > 0) {

       for (var i = 0; i < ch_transactionProducts.length; i++) {









} catch(er){

 console.log('could not run Justuno Script')