Install Justuno on Neto / Maropost

This article will walk you through installing Justuno embed code on a Neto/Maropost ecommerce website

On this page:

Justuno & Maropost Introduction

Standard & Cart Tracking Code

Conversion Tracking Code

Introduction to Maropost & Justuno


Maropost’s (formerly Neto)  suite of commerce software gives small teams superpowers. It’s sophisticated, but easy to use. Enterprise grade, but just right for you.  Once the following Justuno embed code is added, your Justuno workflows and designs will able to viewed on your Maropost website.  This embed code takes care of the basic embed code, cart tracking code and conversion tracking code.

 

Add Justuno's Standard & Cart Tracking Embed Code


To add a custom script to your webstore:

  1. In your Maropost Commerce control panel select Settings & tools > All settings & tools

  2. In the Settings & tools page, select Custom Scripts

  3. The Custom Scripts page shows all current custom scripts installed. You can edit existing scripts here or select New to add a new custom script.

    image1

  4. Enter the Name of the script you are installing. This is an internal reference only.

    image2

  5. Paste the following code into the Page Footer section.

    Replace {{Justuno Account Number}} towards the top of this code with the token ID found at https://portal.justuno.com/app/account/embed-code.

    [%ajax_loader content_type_name:'1' current_sku:'1' parent_sku:'1' user:username:'1'%]
    <script data-cfasync="false">

    window.ju4_num="{{Justuno Account Number}}";

    window._juprodId = '[%product sku:'[@current_sku@]'%][%param *body%][%if [@parent_sku@] ne ''%][@parent_sku@][%else%][@current_sku@][%/if%][%/param%][%/product%]';
    window._jucustId = '[@user:username@]';
    window.ju4_asset_host="https://justone.ai/embed";window.ju4_pApi="https://justone.ai";window.ju4_api="https://api.justuno.com";(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',ju4_asset_host+'/ju_init.js?v=2','ju4app');

    [%cart_items%]
        [%param *header%]
            var juCartItems = [];
        [%/param%]
        [%param *body%]
            juCartItems.push({
                productid: '[%if [@parent_sku@] ne ''%][@parent_sku@][%else%][@sku@][%/if%]',
                variationid: '[@sku@]',
                sku:'[@sku@]',
                qty: [@qty@],
                price: [@price@]*100,
                name: '[@model@]'
                discount: [@discount@]*100
            });
        [%/param%]
        [%param *footer%]
            ju4app('cartSync',{
            items:juCartItems,
                cart:{
                    currency: 'AUD'
                }
            });
        [%/param%]
    [%/cart_items%]

    var juNeto = {
      cartUpdate: function(){
        var juCartItemsRaw = $.getCartCache();

        var juCartItems = juCartItemsRaw.map(item => {
            return {
                productID: item.sku ? item.sku : item.parent_sku,
                variationID: item.sku,
                sku: item.sku,
                price: parseInt(item.price.replace(/[^0-9.-]+/g, "")) * 100,
                qty: parseInt(item.baseqty),
                name: item.name,
                discount: 0
            };
        });
        ju4app('cartSync',{
            items:juCartItems,
            cart:{
                currency: 'AUD'
            }
        });
      },
      init: function(){
          nAddItemCallbacks.push(juNeto.cartUpdate);
          nAddMultiItemsCallbacks.push(juNeto.cartUpdate);
          nRemoveItemCallbacks.push(juNeto.cartUpdate);
      }
    }

    juNeto.init();
    </script>
    [%/ajax_loader%]

     

    image3

  6. When complete, click the Save button.

Please Note: Changes to a custom script require you to authenticate your access. Click the Send Token Now button and an email will be sent to you with a security token. Copy the token and paste it into the verification field. Click the Verify Token button and your changes can be saved. The token will last two hours in case you need to change multiple scripts.


Justuno's Standard Embed Code & Cart Tracking Code is now installed and ready to function on your webstore.

Add Justuno's Conversion Tracking Embed Code


To add a custom script to your webstore:

  1. Paste the code below into the Purchase Confirmation section of the widget.

Replace {{Justuno Account Number}} towards the top of this code with the token ID found at https://portal.justuno.com/app/account/embed-code.

<script data-cfasync="false">

window.ju4_num="{{Justuno Account Number}}";

window._jucustId = '[@user:username@]';
window.ju4_asset_host="https://justone.ai/embed";window.ju4_pApi="https://justone.ai";window.ju4_api="https://api.justuno.com";(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',ju4_asset_host+'/ju_init.js?v=2','ju4app');

[%show_order id:'[@order_id@]'%]
  [%param *header%]
      var juPurItems = [];
  [%/param%]
  [%param *body%]
    juPurItems.push({
      productID: '[%if [@parent_sku@] ne ''%][@parent_sku@][%else%][@sku@][%/if%]', // required
      variationID: '[@sku@]', // required
      sku: [@sku@], // required
      name: '[@model@]', // required
      qty: [@qty@], // required
      price: [@PRICE@]*100 // required in cents $100 = 10000
    });
  [%/param%]
  [%param *footer%]
    ju4app("order", {
      orderID: '[@order_id@]',  // required, must be unique per order
      grandTotal: [@grand_total@]*100, // required in cents $100 = 10000
      subTotal: [@subtotal@]*100, // required in cents $100 = 10000
      tax: [@tax_total@]*100, // required in cents $100 = 10000
      shipping: [@shipping_total@]*100, // required in cents $100 = 10000
      discount: [@discount_total@]*100, // required in cents $100 = 10000
      currency: '[@config:defaultcurrency@]', // required example 'USD'
      discountCodes: '', // required comma seperated, can leave blank
      cartItems:juPurItems
    });
  [%/param%]
[%/show_order%]
</script>

When complete, click the Save button.

Please Note: Changes to a custom script require you to authenticate your access. Click the Send Token Now button and an email will be sent to you with a security token. Copy the token and paste it into the verification field. Click the Verify Token button and your changes can be saved. The token will last two hours in case you need to change multiple scripts.


Justuno's Conversion Tracking Code is now installed and ready to function on your webstore.