Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple Google Adwords conversion labels on same page

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>
like image 460
Hoppe Avatar asked Dec 04 '11 16:12

Hoppe


1 Answers

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.

like image 162
Moo Avatar answered Sep 29 '22 11:09

Moo