If you want to integrate the referral product on to your website then follow these simple steps.


1. You need to paste the code below onto the across the entire site before the end of the </body> tag. You can paste if where you currently have placed your Google Analytics code if you have it.


<!-- ViralMint JS -->

<script type="text/javascript">
window.vrlmnt = (function(d, s, id) {
        var js, vjs = d.getElementsByTagName(s)[0];
        if (d.getElementById(id)) return; js = d.createElement(s);
        js.src = "//cdn.viralmint.com/js/viralmint-min.js";
       js.id = id; js.acc_id = "1374859267"; vjs.parentNode.insertBefore(js, vjs);
        return window.vrlmnt || (v = { _e: [], ready: function(f){v._e.push(f)}});
}(document, "script", "viralmint-js"));

</script>


2. After integrating the above js code, you need to paste the code below in order to enable the referral product. This code needs to be placed on the Thank You page where you display the Order ID or this is the immediate next page the user lands to after redirecting from the payment processor. For the referral product to work you would need to pass us the information on the products the user just bought to our javascript so that we can enable the referral.


If the cart of the customer contains only one product, then paste the following piece of code


{

    "title": "product_title_here",

    "description": "product_title_here",
    "image": "product_image_path_here",
    "link": "product_link_here",
    "price": 51,
}   

The above piece of code will enable you to pass the following information:


1. Name/Title of the product

2. Something that describes the product.

3. The product image.

4. The URl/Link where the product is posted.

5. The product price.


In the scenario where the customer has more than one products in his cart, paste the following piece of code on the respective pages.


{

   "title": "product_title_here",

    "description": "product_title_here",
    "image": "product_image_path_here",
    "link": "product_link_here",
    "price": 51,

 "purchases": [
        {
            "title": "product_title_here",
            "description": "product_title_here",
            "image": "product_image_path_here",
            "link": "product_link_here",
            "price": 51
        },
        {
            "title": "product_title_here",
            "description": "product_title_here",
            "image": "product_image_path_here",
            "link": "product_link_here",
            "price": 51
        }
    ]
}


This piece of code will enable you to pass the same information as listed above for multiple products present in the customer's cart.