Google Adwords Conversion Tracking Code

Hi,

I just did the following, which according to my testing, works, but would like to know if someones thinks this won’t always work for some reason.

Adwords gives you a tracking code to place in your conversion page html body tag. The code is something like:




<!-- Google Code for Inquire Conversion Page -->

<script type="text/javascript">

/* <![CDATA[ */

var google_conversion_id = ;

var google_conversion_language = "en";

var google_conversion_format = "3";

var google_conversion_color = "ffffff";

var google_conversion_label = "";

var google_conversion_value = 0;

var google_remarketing_only = false;

/* ]]> */

</script>

<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">

</script>

<noscript>

<div style="display:inline;">

<img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/?value=0&amp;label=&amp;guid=ON&amp;script=0"/>

</div>

</noscript>

As my conversion page and "product" page are the same, the only thing that changes is a flash message, I inserted this code on a setFlash in my controller and pick it up with a getFlash in the view. I tested and the code does NOT appear when the product place is shown, but DOES appear when the product page is shown WITH the flash message (what we want to track).

I don’t know if I made myself clear, if you need any additional information on the implementation please let me know.

Thanks!

German