如何为marollo社区添加转化跟踪以进行广告投放

I am using magento 1.8.1.0 community edition and I have signed up with adroll retargeting service and need to add conversion tracking.The code adroll supplies to add (to success.phtml) is this :

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

I have added it to the end of the file. This does not work and my rep says that it only works with Enterprise edition (I cant think why this would be). I have searched further and have been trying :

<?php
//Get Order Number & Order Total
$order = Mage::getModel('sales/order')->loadByIncrementId(Mage::getSingleton('checkout/session')->getLastRealOrderId());
$amount = number_format($order->getGrandTotal(),2);
?>

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

If i add a static conversion amount value via the adroll admin interface and try a test checkout then it registers the conversion and uses that static amount (so proving communication takes place). If I dont have a static amount then the conversion is not registered - so this suggests the actual value is not being passed?

Can anyone see if there is something wrong with that code or know how I can achieve this.

** UPDATE **

The above second set of code is working. The confusion was because when I relied on the static value only , it updated conversions immediately. When I removed on the static values and relied on the passing of the order value it takes some time to update in the backend (not sure why - maybe processed as a cron somehow) but my values are "arriving" some times afterwards now which is sufficient for my needs.

Not sure if this is a version difference, but in my success.phtml template I use Mage::getModel('sales/order')->load(Mage::getSingleton('checkout/session')->getLastOrderId()). May be worth a try.

Another option you could try is Mage::getModel('sales/order')->loadByAttribute('quote_id', Mage::getSingleton('checkout/session')->getLastQuoteId()).