Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 type="text/javascript" src="http://www.googleadservices.com/pagead/conversion.js">
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="http://www.googleadservices.com/pagead/conversion/12345/?label=opaque&amp;guid=ON&amp;script=0"/>

It is composed of two parts:

  1. For clients supporting javascript, an inline script that sets variables, plus loading a reporting script.
  2. For other clients, an image tag.

As far as I can see, the image tag has some advantages:

  1. It works on all browsers.
  2. It is asynchronous.
  3. 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?

share|improve this question
up vote 2 down vote accepted

The image will have more limitations than javascript code. The image can also be more easily blocked using browser plugins.

When you use the javascript you can use its api to track different variables such as order items, and total.

Good practice is to include both.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.