PDA

View Full Version : Sales tracking with JS



billuk
04-22-2005, 08:03 AM
With Google Adwords, when they give you the tracking code to put on the 'Sale confirmed' page so you can see what ads produce sales, the tracking code is :


<!-- Google Code for Purchase Conversion Page -->
<script language="JavaScript" type="text/javascript">
<!--
var google_conversion_id = 0;
var google_conversion_language = "en_GB";
var google_conversion_format = "1";
var google_conversion_color = "FFFFFF";
if ([VALUE]) {
var google_conversion_value = [VALUE];
}
var google_conversion_label = "Purchase";
//-->
</script>
<script language="JavaScript" src="https://www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<img height=1 width=1 border=0 src="https://www.googleadservices.com/pagead/conversion/0/?value=[VALUE]&label=Purchase&script=0">
</noscript>

The Javascript this calls basically tries to produce an iframe and if iframes are not enabled it produces an image, and if javascript is disabled in the firstplace it shows the same image.

So my question is why bother with the javascript, why not just try the iframe without the javascript, but more than that why not just track with an image?

Chris
04-22-2005, 12:55 PM
Javascript is the best option I believe, so they try to use it the most.

billuk
04-22-2005, 01:14 PM
But what's to be gained over just calling an image with the value of the sale instead?

e.g.
<img src="track.gif?value=12.99">

That's what I cant understand. :confused: