The Foxy forums are on the move!

We're in the process of moving our forums over to a new system, and so these forums are now read-only.
If you have a question about your store in the meantime, please don't hesitate to reach out to us via email.

Yahoo Conversion Tracking Code

sandysandy Member
in General edited December 2008
My client wants to use Yahoo's "Conversion Only" tracking code. The instructions are to "insert it between the <HEAD> and </HEAD> tags on your site's conversion page", however, I am using ModX so the thank you page is based on the site template.

Would it work if I put the code in my FoxyCart Standard Receipt template?
The code is:
<SCRIPT language="JavaScript" type="text/javascript">
<!-- Yahoo! Inc.
window.ysm_customData = new Object();
window.ysm_customData.conversion = "transId=,currency=,amount=";
var ysm_accountid = "xxxxxxxxxxxxxxxxxxxxx";
document.write("<SCR" + "IPT language='JavaScript' type='text/javascript' "
+ "SRC=//" + "" + "/script/ScriptServlet" + "?aid=" + ysm_accountid
+ "></SCR" + "IPT>");
// -->

Of course, any other ideas are welcome! I have been known to want to put stuff in exactly the wrong place!
  • lukeluke FoxyCart Team
    Only one way to find out. :)

    Yeah, that should work just fine.
  • brettbrett FoxyCart Team
    What I usually do in MODx sites is create an extra TV like [*head_extra*], then stick that above your </head> tag.

    Then on a per page basis you can insert whatever extra scripts you want. So you'd stick it in your MODx page that you're using, then tell FoxyCart to cache that page as your receipt, and you'd have it how it's supposed to be.

    They probably want it in the <head> so there's no chance the page will load without firing the script, but it should work if it's in the <body> (though it may be against their rules; probably want to check that).
Sign In or Register to comment.