Integrating with Magento

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

Note: This code-based integration only supports Magento 1

  1. In the Magento admin area, got to Configuration > General > Design > Footer
  2. Add the following code to the Miscellaneous HTML box.

    <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: "magento" });
        tap('detect');
    </script>
    

    {{{{NO_ACCOUNT_ID_SET_MESSAGE}}}}

  3. Open the file: app\design\frontend\XXXX\XXXX\template\checkout\success.phtml

  4. At the end of the file, add the following code:

    <?php
        //Get Order Number & Order Total
        $order = Mage::getModel('sales/order')->loadByIncrementId(Mage::getSingleton('checkout/session')->getLastRealOrderId());
        $amount = number_format($order->getGrandTotal() - $order->getShippingAmount() - $order->getShippingTaxAmount() ,2);
    ?>
    <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: "magento" });
        tap('conversion', '<?php echo $this->getOrderId() ?>', <?php echo $amount ?>);
    </script>
    

    {{{{NO_ACCOUNT_ID_SET_MESSAGE}}}}

  5. Save and you are all done!

Magento 2

While Tapfiliate has not created an integration for Magento 2, a third-party created an integration that consists of an extension for Magento 2.

You can learn more about this option here.

Please note that as this integration was not created by Tapfiliate, we cannot offer support with this integration.

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.

Start a 14-day free trial with all our features enabled