Neto

Installing Rejoiner Scripts on Neto

  1. First, open Custom Scripts from the Neto admin interface. Then, navigate to Settings & Tools > All settings & tools > Custom Scripts
600
  1. Next, we'll add a new custom script. Click on the Add New button.
600
  1. Now we'll add the Page Header Tags. Name the script Rejoiner and make sure Page Header is selected.
600
  1. Paste the Page Header Tags
<!-- Rejoiner -->
<script type='text/javascript'>
var rejoinerAcct = {
    siteId: '{{ site_id }}',
    domain: '{{ site_domain }}',
};

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

[%if [@config:current_page_type@] eq 'product'%]
<script type='text/javascript'>
_rejoiner.push(['trackProductView', {
    'product_id': '[@sku@]',
    'name': '[@model@]',
    'price': Math.round([@price@] * 100),
    'product_url': '[@url@]',
    'image_url': '[@config:homeurl@][@thumb@]',
}]);
</script>
[%/if%]

[%if [@config:current_page_type@] eq 'checkout'%]
[%cart_items%]
[%param *header%]
<script type='text/javascript'>
_rejoiner.push(['setCartData', {
    'cart_value': Math.round([@cart:product_total@] * 100),
    'cart_item_count': [@cart:total_items@],
    'return_url': '[%url page:'checkout' type:'cart'/%]',
}]);
[%/param%]
[%param *body%]
_rejoiner.push(['setCartItem', {
    'product_id': '[@sku@]',
    'name': '[@model@]',
    'price': Math.round([@price@] * 100),
    'item_qty': [@qty@],
    'qty_price': Math.round([@qty@] * [@price@] * 100),
    'product_url': '[@url@]',
    'image_url': '[@config:homeurl@][@thumb@]',
    [%if [@short_description@] %]
    'description': '[@short_description@]',
    [%/if%]
}]);
[%/param%]
[%param *footer%]
</script>
[%/param%]
[%/cart_items%]
[%/if%]
<!-- End Rejoiner -->
  1. Finally, we'll add the purchase confirmation tags. Make sure Purchase Confirmation (Thank You Page) is selected.
600
  1. Paste the purchase confirmation tags.
<!-- Rejoiner -->
<script type='text/javascript'>
_rejoiner.push(['sendConversion', {
    cart_data: {
        'cart_value': Math.round([@product_total@] * 100),
        'cart_item_count': [@total_items@],
        'customer_order_number': '[@order_id@]',
        [%if [@coupon_code@] %]
        'promo': '[@coupon_code@]',
        [%/if%]
        'return_url': '[%url page:'account' type:'orders' id:'[@order_id@] /%]',
    },
    [%show_order id:'[@order_id@]'%]
    [%param *header%]
    cart_items: [
    [%/param%]
        [%param *body%]
        [%product sku:[@sku@]%]
        [%param *body%]
        {
            'product_id': '[@sku@]',
            'name': '[@model@]',
            'price': Math.round([@price@] * 100),
            'item_qty': [@qty@],
            'qty_price': Math.round([@qty@] * [@price@] * 100),
            'product_url': '[@url@]',
            'image_url': '[@config:homeurl@][@thumb@]',
            [%if [@short_description@] %]
            'description': '[@short_description@]',
            [%/if%]
        },
        [%/param%]
        [%/product%]
        [%/param%]
    [%param *footer%]
    ]
    [%/param%]
    [%/show_order%]
}]);
</script>
<!-- End Rejoiner -->
  1. To complete the integration, click Save