Any advantage to the script version of Google Adwords' conversion tracking code?
- by ripper234
Google Adword has an HTML snippet to track conversions:
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = 12345;
var google_conversion_language = "en";
var google_conversion_format = "3";
var google_conversion_color = "ffffff";
var google_conversion_label = "someopaqueid";
var google_conversion_value = 0;
/* ]]> */
</script>
<script type="text/javascript" src="http://www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="http://www.googleadservices.com/pagead/conversion/12345/?label=opaque&guid=ON&script=0"/>
</div>
</noscript>
It is composed of two parts:
For clients supporting javascript, an inline script that sets variables, plus loading a reporting script.
For other clients, an image tag.
As far as I can see, the image tag has some advantages:
It works on all browsers.
It is asynchronous.
It's shorter to have only this version, compared to both this and the js version.
Any reason not to drop the <noscript> tag and just use the image conversion snippet directly?