OSI Affiliate Software integrates perfectly with embedded PayPal buttons.


Follow the steps below on how to integrate the Paypal button with our software.


Step 1.  From your admin dashboard, click on Set up software.


Step 2. Click on Link Software to My Store to get the snippet of code.


Step 3. Click on the drop-down list and look for PayPal


Step 4. Embed the following tracking code within your PayPal button. It is easy to do this. All you have to do is insert the code below before the tag within your PayPal button.


NOTE:

EXAMPLE OF HOW IT SHOULD LOOK LIKE ONCE ADDED TO THE PAYPAL BUTTON EMBED CODE. OSI TRACKING CODE IS THE BOLD TEXT. DO NOT USE:


<form action="http://www.paypal.com/cgi-bin/webscr" method="post">
<input name="cmd" type="hidden" value="_s-xclick" />
<input name="hosted_button_id" type="hidden" value="XXXXXXXX" />
<input alt="PayPal - The safer, easier way to pay online!" border="0" name="submit" src="http://www.paypalobjects.com/en_US/i/btn/btn_buynowCC_LG.gif" type="image" />
<img alt="" border="0" height="1" src="http://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" />
<input name="notify_url" type="hidden" value="https://ninademo.ositracker.com/sales/paypal_plugin" />
<input id="custom" name="custom" type="hidden" />
<script language="JavaScript" src="https://ninademo.ositracker.com/sales/get_affiliate" type="text/javascript">
</form>

Step 5. Add the code below right before the closing body tag of your website landing page. Note, this should get added to the page that people go to when they click on an affiliate link.

<script type="text/javascript">

function setCookie(cname,cvalue,exdays) {

    var d = new Date();

    d.setTime(d.getTime() + (exdays*24*60*60*1000));

    var expires = "expires=" + d.toGMTString();

    document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";

}

var urlParams;

(window.onpopstate = function () {

    var match,

        pl     = /\+/g,  // Regex for replacing addition symbol with a space

        search = /([^&=]+)=?([^&]*)/g,

        decode = function (s) { return decodeURIComponent(s.replace(pl, " ")); },

        query  = window.location.search.substring(1);

    urlParams = {};

    while (match = search.exec(query))

     urlParams[decode(match[1])] = decode(match[2]);

    if (urlParams['affiliate_id']) {

        // alert('affiliate_id = '+urlParams['affiliate_id']);

        setCookie("affiliate_id", urlParams['affiliate_id'], 60);

    }

    if (urlParams['prodgroup']) {

        // alert('prodgroup = '+urlParams['prodgroup']);

        setCookie("prodgroup", urlParams['prodgroup'], 60);

    }

})();

</script>


Step 6Add the code below to the same page that your PayPal button is on. Thie code shown below should be right before your closing body tag.

<script type="text/javascript">

function getCookie(cname) {

    var name = cname + "=";

    var decodedCookie = decodeURIComponent(document.cookie);

    var ca = decodedCookie.split(';');

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

        var c = ca[i];

        while (c.charAt(0) == ' ') {

            c = c.substring(1);

        }

        if (c.indexOf(name) == 0) {

            return c.substring(name.length, c.length);

        }

    }

    return "";

}

var affiliate_id = getCookie("affiliate_id");

var prodgroup = getCookie("prodgroup");

if (affiliate_id != "" && prodgroup != "") {

    var hidvar=affiliate_id+'@'+prodgroup;

    var x = document.getElementsByName('custom');

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

        x[i].value=hidvar; 

    }

}

</script>


Step 7. Click Settings and Show Advanced Settings. Enable Include Parameters in affiliate URL.

That is it. The software is now integrated with PayPal. You can go ahead and test to see if it works.


Click here for FREE Integration.