Magento Order Confirmation – How to Add Tracking Pixel

checkoutecommerce-trackingonepage-checkout

I have received a tracking pixel from one of our advertising company, and they asked me to place that code in my order confirmation page.

first of all can some one tell me where is the order confirmation file located in magento?

And 2nd if i need to get "order ID" value and "Amount" of the order then what to use in this pixel.

<img src="https://www.emjcd.com/u?AMOUNT=AMOUNT&CID=7777777&OID=OID&TYPE=5555555&CURRENCY=GBP&METHOD=IMG" height="1" width="20"/> 

you can get more information here: http://www.pricerunner.co.uk/about/sales-tracking-instructions.html

Best Answer

You will need to copy your base template file from

app/design/frontend/base/default/template/checkout/success.phtml

To your ultimo theme path

app/design/frontend/ultimo/default/template/checkout

You can put below code in your success.phtml file

<?php    
    $order_id = Mage::getSingleton('checkout/session')->getLastRealOrderId();
    $order = Mage::getModel('sales/order')->loadByIncrementId($order_id);
    $grandTotal = $order->getGrandTotal();
    $orderCurrency = $order->getOrderCurrencyCode();
?>

<img src="https://www.emjcd.com/u?AMOUNT=<?php echo $grandTotal; ?>&CID=7777777&OID='<?php echo $order_id;?>'&TYPE=5555555&CURRENCY=<?php echo $orderCurrency; ?>&METHOD=IMG" height="1" width="20"/>        
Related Topic