View Single Post
  #29  
Old 10-29-2007, 02:00 PM
 
ozchris ozchris is offline
 

Senior Member
  
Join Date: Jun 2007
Posts: 100
 

Default Re: Google Adwords Conversion Tracking: a how-to on adding code

I have to agree that the Google integration on 4.1.8 is not at all straightforward.

I had problems putting the analytics code in - the input screen kept blanking out the code when i pasted it in, and the actual call was missing from the bottom of the template, so I ended up hardcoding it into the template.

And with the adwords code, as economedical, i was getting a smarty error.

And the code that adwords provides assumes a $1 conversion value, unless you read the help page, which suggests using your total value field.

I ended up pasting this code:

<!-- Google Code for purchase Conversion Page -->
{literal}
<script language="JavaScript" type="text/javascript">
<!--
var google_conversion_id = xxxxxx;
var google_conversion_language = "en_AU";
var google_conversion_format = "1";
var google_conversion_color = "FFFFFF";
if ({/literal}{$full_subtotal}{literal}) {
var google_conversion_value = {/literal}{$full_subtotal}{literal};
}
var google_conversion_label = "purchase";
//-->
</script>
{/literal}
<script language="JavaScript" src="https://www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<img height=1 width=1 border=0 src="https://www.googleadservices.com/pagead/conversion/xxxxxxxx/imp.gif?value={$full_subtotal}&label=purchase&scri pt=0">
</noscript>


copied from this thread http://forum.x-cart.com/showthread.php?t=33607&page=2&highlight=adwords+tr acking, but in testing on xampp, i am not getting the displayed google code.

will let you know what happens in prod.

(also using aud currency)
__________________
Linux. Apache. PHP 5.2
Site 1 - now xcart 4.4.1 DSEFU, AOM, RMA, Magnifier, Upsells. Heavy mods for Australian postcode validation and extra Aussie payment method.
Site 2 - xcart 4.1.11, DSEFU
Site 3 - xcart 4.2
Site 4 - xcart 4.3
Reply With Quote