<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.28.0">
</HEAD>
<BODY>
I could be wrong but I believe that Ubercart comes with the uc_googleanalytics module which does this for you.<BR>
<BR>
On Wed, 2010-12-08 at 16:15 -0700, Lynn Stott (Stott Design) wrote:<BR>
<BLOCKQUOTE TYPE=CITE>
Hi,
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BR>
<BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
Using Ubercart, I'm adding the Google adwords conversion code to the bottom of the checkout complete page. How would I capture the order total? And/or is there a better way to do this? I've used this method the past 3 months but got zero conversions. It seems this person has the same issue (see last comment)... <A HREF="http://www.ubercart.org/forum/support/1478/google_conversion_tracking">http://www.ubercart.org/forum/support/1478/google_conversion_tracking</A>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BR>
<BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<!-- Google Code for I/O Bio Purchase Conversion Page -->
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<script type="text/javascript">
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
/* <![CDATA[ */
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
var google_conversion_id = xxxxxxxx;
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
var google_conversion_language = "en";
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
var google_conversion_format = "2";
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
var google_conversion_color = "ffffff";
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
var google_conversion_label = "WHb7CN6x6wEQtrzd-AM";
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
var google_conversion_value = 0;
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
if (<FONT COLOR="#df512e"><?php echo $order->order_total; ?></FONT>) {
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
google_conversion_value = <?php echo $order->order_total; ?>;
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
}
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
/* ]]> */
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
</script>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<script type="text/javascript" src="<A HREF="http://www.googleadservices.com/pagead/conversion.js">http://www.googleadservices.com/pagead/conversion.js</A>">
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
</script>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<noscript>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<div style="display:inline;">
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<img height="1" width="1" style="border-style:none;" alt="" src="<A HREF="http://www.googleadservices.com/pagead/conversion/1058496054/?value=">http://www.googleadservices.com/pagead/conversion/1058496054/?value=</A><?php echo $order->order_total; ?>&amp;label=WHb7CN6x6wEQtrzd-AM&amp;guid=ON&amp;script=0"/>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
</div>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
</noscript>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BR>
<BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BR>
<BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
Thanks,
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
Lynn
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BR>
<BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BR>
<BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BR>
<BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BR>
<BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BR>
<BR>
</BLOCKQUOTE>
<BR>
</BODY>
</HTML>