Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Google Conversion Tracking


daz_75

Recommended Posts

I've got the conversion code from the google adwords website. But i don't know where to put it in the checkout_success.php file. Im a bit of a noob with php and don't want to mess things up. Any suggestions greatly appreciated.

 

Thanks

 

Daz

Link to comment
Share on other sites

I put mine near the bottom starting at around line 155

 

Just below:

<!-- footer_eof //-->
<br>

 

And above:

</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

So it looks like this:

<!-- footer_eof //-->
<br>
<!-- Google Code for Default Conversion Page -->
<script language="JavaScript" type="text/javascript">
<!--
var google_conversion_id = xxxxxxxx;
var google_conversion_language = "en_US";
var google_conversion_format = "1";
var google_conversion_color = "FFFFFF";
if (1) {
 var google_conversion_value = 1;
}
var google_conversion_label = "Default";
//-->
</script>
<script language="JavaScript" src="http://www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<img height=1 width=1 border=0 src="http://www.googleadservices.com/pagead/conversion/xxxxxxxx/?value=1&label=Default&script=0">
</noscript>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

Hope this helps.

Installed Contributions: CCGV, Close Popup, Dynamic Meta Tags, Easy Populate, Froogle Data Feeder, Google Position, Infobox Header Entire Row, Live Support for OSC, PayPal Seal with CC images, Report_m Sales, Shop by Price Revised, SQL Updater, Who's Online Enhancement, Footer, GNA EP Assistant and still going.

Link to comment
Share on other sites

Thanks, that's great.

 

One thing im a bit confussed about is the

 

Advanced option: conversion value

 

I've read the google pdf, and it talks about putting in <?echo totalvalue?> but with the correct "totalvalue" syntax for my site. I notice in yours you just have it set to 1, is that ok?

 

Cheers

 

Daz

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...