Quote Originally Posted by thomaswhiteeagle View Post
Here is the fix to get Google PPC conversion tracking working without using the simple google analytics module, for anyone perhaps ever facing an issue similar to mine. The background on it is since we upgrade to zen 1.5x series our tracking stopped working. Haven't been able to figure out why. econcepts was going to look into it for us but simply doesn't appear to have the time as we've been waiting for about a month now. But since our site is a production site that relies heavily on Google PPC having the tracking data is critical to us. SO I dug back into our files for code we'd manually used in the past that had worked and found this and modified it for current use and voila it is working correctly. Basically it is the exact code provided by google (replace the "x's" in my code with your id provided by google or better yet simply copy the code google gives you and replace the order value information)

It may or may not work for you were using it on latest version of zen cart, eg, 1.5x series.
always backup your files before making any changes, you've been warned, :)

simply put this is the code provided by google. what makes it work is replacing the var google conversion value part with this: var google_conversion_value = <?php echo $order_summary['order_total']; ?>; - also will not track properly if you don't have in the noscript area this part as shown below: value=<?php echo $order_summary['order_total']; ?>

I placed it at the bottom of my tpl_checkout_success_default.php file.

code:
<!-- Google Code for Purchase/Sale Conversion Page -->
<script type="text/javascript">
/* <=!=[=C=D=A=T=A=[ */
var google_conversion_id = xxxxxxxxxx;
var google_conversion_language = "en";
var google_conversion_format = "3";
var google_conversion_color = "ffffff";
var google_conversion_label = "FDn3COeWQxCbr7__Aw";
var google_conversion_value = <?php echo $order_summary['order_total']; ?>;
var google_conversion_currency = "USD";
var google_remarketing_only = false;
/* ]=]=> */
</script>
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/xxxxxxxxxx/?value=<?php echo $order_summary['order_total']; ?>&currency_code=USD&label=FDn3COeWQxCbr7__Aw&guid=ON&script=0"/>
</div>
</noscript>
Thomas, this will potentially only work for your site. Reason being, it has a tracking label in it that is set to your conversion id. The other thing to note here is that the "xxxxxxxx" spot should be dynamically filled in by the program itself (already) so manually filling that in might have potential problems at some point. That field is controlled by the Admin section of the plugin.

I just finished the updated version of this mod (a long time in the making as work here has been busy) and installed on a few sites. It works with all versions of zen cart (forward and backward compatible) It has completely been updated to adhere to all new Google features including a good number of features that many are not aware of within Google Analytics (but that are very important to increasing sales.)

I'll make a link available for the new version here to download shortly. Likewise, I'll be uploading the package after providing the link to the Zen cart plugin section.