EdithInnoportal Posted July 19, 2022 Share Posted July 19, 2022 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> Link to comment
tuanphan Posted July 20, 2022 Share Posted July 20, 2022 Try adding it to Home > Settings > Advanced > Code Injection > Footer Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment