1

These are the instructions. I have put the code in the success file but its not passing any order values back to Adroll.

Confirm that your AdRoll SmartPixel is placed in the Miscellaneous HTML section in your Magento Admin Panel. In the folder that contains your Magento files, find the file with the path /app/design/frontend/default/yourskinname/template/checkout/success.phtml. There are several success.phtml files within the root folder, so make sure to find the appropriate one. Open up the file in a text editor and add the following php and javascript code in a place that does not interfere with the code that already lives in the file:

Please click on the link below to show the proper code

<script type = "text/javascript">
adroll_conversion_value_in_dollars = <?php echo $total ?>;
adroll_custom_data = {"ORDER_ID": "<?php echo $this->__($this->escapeHtml($this->getOrderId())) ?>"};
</script>

https://help.adroll.com/hc/en-us/articles/201974620-Enhanced-Conversion-Tracking-for-Magento

Any ideas?

Anna Völkl
  • 17,341
  • 5
  • 60
  • 141

1 Answers1

1

It seems there's missing some code. $total and $order aren't defined anywhere.

<?php
$orderId = Mage::getSingleton('checkout/session')->getLastOrderId();
$order = Mage::getModel('sales/order')->load($orderId);
?>
<script type = "text/javascript">
adroll_conversion_value_in_dollars = <?php echo $order->getBaseGrandTotal(); ?>;
adroll_custom_data = {"ORDER_ID": "<?php echo $order->getIncrementId(); ?>"};
</script>
Sander Mangel
  • 37,528
  • 5
  • 80
  • 148