All Collections
Integrations
Integrating with Magento I
Integrating with Magento I

Learn how to integrate Tapfiliate with Magento I.

Maria avatar
Written by Maria
Updated over a week ago

Please note that we currently support Magento I integrations only.

  1. In your Magento admin aread, go to Configuration > General > Design > Footer and 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>

Don't forget to replace 'YOUR ACCOUNT ID' with a respective value from your Tapfiliate account.

2. Open the file: app\design\frontend\XXXX\XXXX\template\checkout\success.phtml and add the following code snippet at the end of it:

<?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>

Please remember to run a test before going live. You can create a test conversion by following the steps described here.

You can also out our Magento integration guide here.

Did this answer your question?