Forums

Yahoo Conversion Tracking Code

acaweb 18 Feb, 2009
Hi There,
New to Joomla and Chrono forms and loving the Joomla CMS.

So I need to install a Yahoo tracking code on the THANK YOU page of the contact form located throughout the site at: <!-- w --><a class="postlink" href="http://www.southwesttitleloans.com">www.southwesttitleloans.com</a><!-- w -->. The Yahoo tracking code needs to be installed in the HEAD tags only on the Thank You page that processes the form. I do not currently have a custom thank you page created...it is created dynamically by ChronoForms.

Is there any way to get the Yahoo Conversion code into the head tags of the Thank You page ?

Any and all help would be greatly appreciated.

Thanks-
Anita
GreyHead 18 Feb, 2009
Hi Anita,

Welcome.

Exactly what do you need to put in the page headers? A meta tag? Or a script snippet like the Google Analytics code? Can you paste an example here or point to the Yahoo docs please.

Bob
acaweb 18 Feb, 2009
Hi Bob,

Thanks so much for your reply.

It's a script snippet like Google's.

Here it is...

<SCRIPT language="JavaScript" type="text/javascript">
<!-- Yahoo! Inc.
window.ysm_customData = new Object();
window.ysm_customData.conversion = "transId=,currency=,amount=";
var ysm_accountid = "1QJ19L0BRF74LTC8U21BCQGFDKS";
document.write("<SCR" + "IPT language='JavaScript' type='text/javascript' "
+ "SRC=//" + "srv3.wa.marketingsolutions.yahoo.com" + "/script/ScriptServlet" + "?aid=" + ysm_accountid
+ "></SCR" + "IPT>");
// -->
</SCRIPT>

Anita
GreyHead 18 Feb, 2009
Hi anita,

Try this
<?php
$doc =& JFactory::getDocument();
$doc->addScriptDeclaration("<!-- Yahoo! Inc.
window.ysm_customData = new Object();
window.ysm_customData.conversion = \"transId=,currency=,amount=\";
var ysm_accountid = \"1QJ19L0BRF74LTC8U21BCQGFDKS\";
document.write(\"<SCR\" + "IPT language='JavaScript' type='text/javascript' \"
+ \"SRC=//\" + \"srv3.wa.marketingsolutions.yahoo.com\" + \"/script/ScriptServlet\" + \"?aid=\" + ysm_accountid
+ "></SCR\" + \"IPT>\");");
?>
Though to be honest I'm not sure that the quote escaping will work correctly. If it doesn't we can try another route.

Bob
acaweb 18 Feb, 2009
Bob, fantastic...though I'm not sure exactly where to place. Would it go in the "On Submit code - after sending email" or "On Submit code - before sending email OR in the template head?

-----------------
Anita

p.s. I truly appreciate your kind assistance with this. I hate when I don't know it all😉 and that happens frequently.
Max_admin 18 Feb, 2009
Hi Anita, Bob's code goes in the "Form HTML code" Box!

Regards
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
acaweb 19 Feb, 2009
Thank you! Here's hoping😉

Anita
acaweb 19 Feb, 2009
Whoopsie...the form disappeared off the site (<!-- w --><a class="postlink" href="http://www.southwesttitleloans.com">www.southwesttitleloans.com</a><!-- w -->) when I added the code😟.

I had to take it off.

Any other suggestions?

Anita
Max_admin 19 Feb, 2009
Hi, try this code, it has a lot of slashes!!

    <?php
    $doc =& JFactory::getDocument();
    $doc->addScriptDeclaration("<!-- Yahoo! Inc.
    window.ysm_customData = new Object();
    window.ysm_customData.conversion = \"transId=,currency=,amount=\";
    var ysm_accountid = \"1QJ19L0BRF74LTC8U21BCQGFDKS\";
    document.write(\"<SCR\" + \"IPT language='JavaScript' type='text/javascript' \"
    + \"SRC=//\" + \"srv3.wa.marketingsolutions.yahoo.com\" + \"/script/ScriptServlet\" + \"?aid=\" + ysm_accountid
    + \"></SCR\" + \"IPT>\");");
    ?>
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
GreyHead 19 Feb, 2009
Hi Anita,

Apologies, I missed a couple of slashes - I think Max has found them all.

If you want to show this *after* conversion, then it needs to go in one of the OnSubmit boxes - then it will show up on the ThankYou page provided that you are not using a ReDirect URL.

Bob
acaweb 19 Feb, 2009
Thank you Max and Bob. The form is still there, now it's just a wait & see on the conversions. Once again I just want to thank you for your time in helping me troubleshoot this custom need for our client.

Anita
Max_admin 19 Feb, 2009
No problems! 🙂

Regards
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.