Multiple Google Adwords conversion labels on same page

Hoppe picture Hoppe · Dec 4, 2011 · Viewed 10.6k times · Source

Can I have more than one google adwords conversion label on a single web page? It looks like the javascript variables would just overwrite each other.

What if I remove the javascript variables and just keep the noscript link?

conversion 1

var google_conversion_id = 123;
var google_conversion_language = "en";
var google_conversion_format = "3";
var google_conversion_color = "666666";
var google_conversion_label = "abc";
var google_conversion_value = 0;

conversion 2:

var google_conversion_id = 456;
var google_conversion_language = "en";
var google_conversion_format = "3";
var google_conversion_color = "000000";
var google_conversion_label = "def";
var google_conversion_value = 0;

followed by script tag:

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

and sample noscript tags:

<div style="display:inline;"><img height="1" width="1" style="border-style:none;" alt="" src="http://www.googleadservices.com/pagead/conversion/..."/>

</div>

Answer

Moo picture Moo · Jul 13, 2012

What worked for us was just including the entire block of code (including the <script type="text/javascript" src="http://www.googleadservices.com/pagead/conversion.js"></script> tag itself) twice. Because the script tag contains code which is executed immediately, including it twice will cause it to execute twice - each time using the variables declared immediately before it.