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:

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.

$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////////”;
// –>

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();


33 Thoughts to “Magento – Yahoo Analytics Conversion Code”

  1. Pharmacy viagra

    Buy viagra no prescription required

  2. best ed pills at gnc

    cheap ed pills

  3. men’s ed pills

    erection pills that work

  4. walmart pharmacy

    canadian pharmacy online

  5. vardenafil pills

    generic levitra online

  6. real casinos online no deposit

    hard rock casino online

  7. viagra online usa

    viagra online canadian pharmacy

  8. doubleu casino online casino

    real casino online

  9. suncoast hotel

    Nonpareil operative Casino sites by oversize perk online casino real money no deposit live roulette casino bgo casino games single dividend for brand-new sportsperson

  10. sites like bovada

    Paragon accessible by computer Casino web sites along walloping fringe benefit kam video poker games bet casino what is the best casino app for ipad swank special compensation for different team player

  11. slots online win real money

    Elite on the Internet Casino sites by husky gratuity best real money online casinos csgo low jackpot sites best betting sites reddit ritzy goody for state-of-the-art competitor

  12. world series of poker 2019

    Favorite ready for use Casino sites near sizable fringe benefit online blackjack games play slots slotocash mobile johnny particular additional compensation for late champ

  13. slots real money

    real money casino online

  14. real money casino

    online casino gambling

Leave a Comment