Magento – Yahoo Analytics Conversion Code

Unlike other tracking codes, we need to put Yahoo Analytics Conversion code between <HEAD> and </HEAD> tags.

Yahoo’s Instructions for the following code are:

To add the Yahoo conversion tracking code in the Head tags, we need to look at the checkout layout configuration file:
/app/design/frontend/your_interface/your_theme/layout/checkout.xml

Find out which page layout it uses when an order is completed.

i.e.) For one page checkout, look for this code:

You can edit the Head section of ‘2columns-right.phtml’ to add the Yahoo tracking code. But if this template, 2columns-right.phtml is being used for other pages, I would make a copy of it and name it ‘2columns-right-success.phtml’ and add the tracking code there. This way, it will track it only when there is a successful conversion.

By Charlie Cheng, March 12, 2010 @ 7:13 am

Thx for pointing right direction. But I would recommend the following code as referenced by yahoo help.

getLastRealOrderId();
$y_order_details = Mage::getModel(’sales/order’)->loadByIncrementId($y_orderid);
$y_saleamt = $y_order_details->subtotal;
?>

<!– Yahoo! Search Marketing Australia & NZ
window.ysm_customData = new Object();
window.ysm_customData.conversion = “transId=,currency=AUD,amount=”;
var ysm_accountid = “//////YOUR TRACKING ACOUNT ID////////”;
document.write(””);
// –>

By Charlie Cheng, March 12, 2010 @ 7:14 am

Missing partial of code before, the first line should be:

$y_orderid = Mage::getSingleton(’checkout/session’)->getLastRealOrderId();

Source

60 thoughts on “Magento – Yahoo Analytics Conversion Code

  1. Pingback: cialis 20 mg price
  2. Pingback: cialis 20mg price
  3. Pingback: ed pills
  4. Pingback: erection pills
  5. Pingback: Buy cheap cialis
  6. Pingback: levitra for sale
  7. Pingback: levitra 10 mg
  8. Pingback: vardenafil 20mg
  9. Pingback: sildenafil 20
  10. Pingback: instant loans
  11. Pingback: pay day loans
  12. Pingback: viagra for sale
  13. Pingback: cialis generic
  14. Pingback: real money casinos
  15. Pingback: madeleine
  16. Pingback: Bovada
  17. Pingback: cialis buy
  18. Pingback: cialis internet
  19. Pingback: cialis 20
  20. Pingback: viagra generic
  21. Pingback: slot machine
  22. Pingback: best online casino
  23. Pingback: female viagra
  24. Pingback: viagra for men
  25. Pingback: propecia generic
  26. Pingback: buy sildenafil
  27. Pingback: generic viagra
  28. Pingback: viagra
  29. Pingback: buy viagra online
  30. Pingback: cheap cialis
  31. Pingback: viagra cheap
  32. Pingback: cialis prices
  33. Pingback: sildenafil 100mg
  34. Pingback: buy cialis
  35. Pingback: buy tadalafil
  36. Pingback: generic cialis
  37. Pingback: generic viagra
  38. Pingback: viagra 50

Leave a Reply