In all cases where we do not offer a pre-created integration guide with the adapted code, you can use our basic JavaScript base code and tailor it to your case.
You can check our video guide to see how you can implement the codes into your website.
Capturing a click
To record a click, you'll have to place this code on every page of your website, between the <head> and </head> tags (in the header).
<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', { integration: "javascript" });
tap('detect');
</script>
Make sure to replace the YOUR ACCOUNT ID with your actual account id. This value can be found in your Profile Settings.
Tracking a conversion
Whenever a conversion takes place, you'll have to launch a code capturing the conversion data. To do so, you can use our conversion page code. The minimum configuration of this code would look like this:
<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', { integration: "javascript" });
tap('conversion');
</script>
Don't forget to inject your actual Account ID!
This code is usually placed on your thank you page, right after the order has been completed, or the lead data has been collected. There are several levels of integration possible with this code. Below you can find the code examples for more complex use-cases:
As long as your platform/website allows you to edit the thank-you page (the last page where customers land after conversion), these adjustments should be possible.
Ideally, the platform should also pass the conversion ID and conversion amount.
Please check out our Javascript integration guide or our Tapfiliate.js docs.