Integrating with Paypal

Out-of-the-box features:
  • Conversion tracking
  • Commission based on order amount
  • Track affiliate coupon code conversions
  • Supports lifetime commissions
  • Auto-handle recurring commissions
  • Auto-handle refunds and disputes
  1. Add the following code just after the <body> tag of every page of your website:

    <script src="https://script.tapfiliate.com/tapfiliate.js" type="text/javascript" async></script>
    <script type="text/javascript">
        function getQueryParams() {
          var assoc  = {};
          var decode = function (s) { return decodeURIComponent( s.replace(/\+/g, " ")); };
          var queryString = location.search.substring(1);
          var keyValues = queryString.split('&');
    
          for(var i in keyValues) {
            var key = keyValues[i].toString().split('=');
            if (key.length > 1) {
              assoc[decode(key[0])] = decode(key[1]);
            }
          }
    
          return assoc;
        };
    
        (function(t,a,p){t.TapfiliateObject=a;t[a]=t[a]||function(){
        (t[a].q=t[a].q||[]).push(arguments)}})(window,'tap');
    
        var params = getQueryParams();
    
        tap('create', '((((YOUR ACCOUNT ID))))', { integration: "paypal" });
    
        if (params.st == 'Completed') {
          var amt = params.amt || 1;
          var tx = params.tx || null;
          tap('conversion', tx,  amt);
        } else {
          tap('detect');
        }
    </script>
    

    {{{{NO_ACCOUNT_ID_SET_MESSAGE}}}}
    This code has to be added to both your landing page, as your thank you page.

  2. Next you will have to configure Paypal:

    1. Login to your paypal account.
    2. Click on the Settings gear on the upper right > Account Settings.
    3. On the left-side navigation column, select Website Payments.
    4. Locate Website Prefernces and click on Update.
    5. Switch Auto return “On” and enter your desired Return url.
    6. Switch Payment data transfer “On”.

Important

Please remember to test a conversion before starting your program. This way you can verify that tracking has been set up correctly. You can create a test conversion by following the steps described here.

Start a 14-day free trial with all our features enabled

Start now