
Originally Posted by
thomaswhiteeagle
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']; ?>¤cy_code=USD&label=FDn3COeWQxCbr7__Aw&guid=ON&script=0"/>
</div>
</noscript>
Bookmarks