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
- Login to your admin area and go to Extensions > Template Manager > Templates and select your current template
Paste the following code in the
index.php
file, just after the<body>
tag<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: "hikashop" }); tap('detect'); </script>
{{{{NO_ACCOUNT_ID_SET_MESSAGE}}}}
Hit Save Changes
Go to Components > Hikashop > Configuration. Next from the sub navigation select Display > Views
Next find the Checkout (view) : End (file) for your current template.
In the editor, append the following code at the end:
$order_id = JRequest::getInt('order_id'); if(empty($order_id)){ $app = JFactory::getApplication(); $order_id = $app->getUserState('com_hikashop.order_id'); } $order =null; if(!empty($order_id)){ $orderClass = hikashop_get('class.order'); $order = $orderClass->loadFullOrder($order_id,false,false); echo " (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: 'hikashop' }); tap('conversion', '" . $order->order_number . ", " . $order->order_subtotal_no_vat . "); "; }
{{{{NO_ACCOUNT_ID_SET_MESSAGE}}}}
Hit Save Changes and you are 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.