Jump to content

EdithInnoportal

Member
  • Posts

    1
  • Joined

  • Last visited

Posts posted by EdithInnoportal

  1. Site URL: https://myinnoportal.com

    Hi everyone, 

    Please can someone guide me on implementing an affiliate program with Squarespace. 
    I will need to set different commission types for varies products. It's all in Javascript.

    I'm not sure how to use the below code: 

    <script src="https://script.tapfiliate.com/tapfiliate.js" type="text/javascript" async></script>
    <script type="text/javascript">
      (function(t,a,p){t.TapfiliateObject=a;t[a]=t[a]||function(){
      (t[a].q=t[a].q||[]).push(arguments)}})(window,'tap');
    
      tap('create', 'YOUR ACCOUNT ID');
    
      var myOrder = {}; // get from your server
    
      var commissions = myOrder.lineItems.map(function(lineItem) {
        return {
          sub_amount: lineItem.subTotal,
          commission_type: lineItem.product.sku
        };
      })
    
      tap('conversionMulti', 'UNIQUE CONVERSION ID', {}, commissions);
    </script>
                        
    

     

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.