The problem I am having is getting the e-commerce analytics to work. The tracking all works great in this hack but no e-commere sales tracking does not.
I also changed the code in includes/modules/pages/checkout_success/google_analytics/jscript_google_analytics.php
to echo just a hidden form and not a JS function (don't understand why this was used in the first place).
to do this change this at the bottom:
echo '<script type="text/javascript">
function zen_utmSetTrans() {
var divHTML = "";
divHTML += "<form style=\"display:none;\" name=\"utmform\">";
divHTML += " <textarea id=\"utmtrans\">";
divHTML += "' . addslashes($transaction) . '";
divHTML += "' . addslashes(trim($items)) . '";
divHTML += " </textarea>";
divHTML += "</form>";
var divUTM = document.createElement("div");
divUTM.id = "utmform";
divUTM.style.display = "none";
divUTM.innerHTML = divHTML;
document.body.appendChild(divUTM);
__utmSetTrans();
}
</script>';
to this:
echo '<script language="text/javascript">
__utmSetTrans(); </script>' .
'<form style="display:none;" name="utmform">
<textarea id="utmtrans">'
. addslashes($transaction) . ' '
. addslashes(trim($items))
. '</textarea>
</form>';
now what is echoed on the checkout_success page is something like this:
<script type="text/javascript">
_uacct = "UA-XXXXXX-1";
urchinTracker();
</script>
<script language="text/javascript">
__utmSetTrans(); </script><form style="display:none;" name="utmform">
<textarea id="utmtrans">UTM:T|82||28.46|1.56|7.95|City|State|United States UTM:I|82|64|Product name|Product Category|18.95|1</textarea>
</form>
This seems to follow what the google analytics help page suggests is needed here:
http://www.google.com/support/analytics/bin/answer.py?answer=27203&topic=7282
The info we are getting is great but being able to track sales would be even better. Maybe it has something to do with all the cart info is on one line I will have to test that. Any help on this would be great.
Are people who are using the default module able to track sales?