Neto

Integration Notes

This is a copy & paste JavaScript integration.

Before you start

Here are some things to know before you begin this process. 

  • You must have a Rejoiner account. If you are curious about Rejoiner, book a call with us. 
  • You will need to your Implementation Details when you set up an integration.

Connect to Neto

To integrate Magento with your Rejoiner account, follow these steps.

  1. Head over your Rejoiner account and go to Settings > Domain
  2. Once there look for your Implementation Details, which should look like so:
  3. Open Custom Scripts from the admin interface
  4. Navigate to Settings & tools > All settings & tools > Custom Scripts
  5. Add a new custom script by clicking on the Add New button.
  6. Name the script "Rejoiner" and make sure Page Header is selected.
  7. Paste the Page Header tags
    IMPORTANT: Make sure you fill in your own Site ID and Domain name.
    <!-- Rejoiner -->
    <script type='text/javascript'>
    var rejoinerAcct = {
        siteId: 'YOUR-SITE-ID',
        domain: 'YOUR-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 -->
    	
  8. Now let's add your purchase confirmation tags. But first, make sure Purchase Confirmation (Thank You Page) is selected.
  9. Paste the following 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 -->
    	
  10. Click the Save button to finish

Next steps

Have a question?

Contact us at integrations@rejoiner.com

Still need help? Contact Us Contact Us