Whether you’re using FastSpring Contextual Commerce, or the Classic Store, installing the Tapfiliate tracking code is easy! This guide will cover both integration options.
Classic Store Instructions
- In the Fastspring admin area select External tracking > Add tracking method > Custom tracking Method
- As the name for this tracking method, pick “Tapfiliate tracking code” or something similar.
- Check Apply to all pages
Select the (before)box and add the following code:
<div> <script type="text/javascript"> var tapjs = document.createElement('script'); tapjs.setAttribute("type","text/javascript"); tapjs.setAttribute("src", "https://script.tapfiliate.com/tapfiliate.js"); tapjs.setAttribute("async", true); document.body.appendChild(tapjs); (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))))', {include_methods: ['3p']}); <choose> <when test="#{complete}"> tap('conversion', '#{order.id}', #{order.subTotal.value}); </when> <otherwise> tap('detect'); </otherwise> </choose> </script> </div>
{{{{NO_ACCOUNT_ID_SET_MESSAGE}}}}
Hit next
In the actions panel in the top right corner, move the switch from test to active
Hit save
Lastly, go to your programs advanced settings and set your tracking method to ‘redirect’
Hit save and you’re all done!
Contextual Commerce Instructions
- In the FastSpring Contextual Commerce admin area select Integrations > Webhooks
- Click on add browser script
- Note Tapfiliate as the name
- Check Events (browser.order.completed)
Add the following code to the function box
function(event) { this.load('https://script.tapfiliate.com/tapfiliate.js', function(){ tap('create', '((((YOUR ACCOUNT ID))))'); tap('conversion', event.data.reference, event.data.subtotal); }); }
{{{{NO_ACCOUNT_ID_SET_MESSAGE}}}}
Hit add, and you’re all done!
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.