Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email

Magento Forum

How to add tracking code for in success.phtml
Jr. Member
Total Posts:  12
Joined:  2012-12-10

This is the script which i need to insert in success.phtml.

<script type="text/javascript\">
var _roi = _roi || [];

// Step 1: add base order details

_roi.push([’_setMerchantId’, ‘545640’]); // required
_roi.push([’_setOrderId’, ‘’]); // unique customer order ID
_roi.push([’_setOrderAmount’, ‘’]); // order total (including VAT)
_roi.push([’_setOrderNotes’, ‘’]); // notes on order, up to 50 characters

// Step 2: add every item in the order
// where your e-commerce engine loops through each item in the cart and prints out _addItem for each
// please note that the order of the values must be followed to ensure reporting accuracy

‘’, // Merchant sku
‘’, // Product name
‘’, // Category id
‘’, // Category name
‘’, // Unit price
‘’ // Item quantity

// Step 3: submit transaction to SDC ROI tracker

<script type="text/javascript\" src=""></script>

I am able to acheive following things

1) grand total
2) orderId
3) customer type

I am still not able to find a way around
1) How to get the total number of product in the shopping cart
2) Getting product name, category name, category id, product price for each product

Please can anyone guide me through this??

Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top