Aloha,
Thanks for answering that question. I wasn't sure, but suspected conversion tracking was totally separate. I do want to install the google analytics module too to get even more stats, but really needed to be able to track ROI right away. I was suprised this conversion tracking solution hadn't been discussed and posted before.
Hi,
I followed the instructions in this post and it worked! Only question now is: is there a way to control where on the page the "Google Site Stats - send feedback" appears? Currently, it appears in the upper left (just off center) of the page.
thanks!
Aloha,
It doesn't seem to be working for me either. I get the conversions, but not the ROI for some reason. I finally got the zen cart Google Analytics contribution installed. I highly recommend doing that first. You get a ton of info including $ of revenue based on the source of the sale, including from a google adwords campaign if that is in the same account. I'm not getting any conversions right now so can't tell if it is working well in that area.
Good luck.
Yogi Jivanandanatha
jivananda,
Do you know why the code you gave stopped working? Jan2 you said everything was working and now it is not. Just checking
Thanks,
Brad
Aloha,
It still works for me, I just did a test order after clicking on my google ad. ROI now appears too, since I installed the Google Analytics plugin into zencart. Strangely, though, I am not getting any outside conversions, even though it "feels" like I am getting more orders from my ads.....
I redownloaded googles code snipet and found a minor difference from what I posted. But either one works fine.
<img height=1 width=1 border=0 src="https://www.googleadservices.com/pagead/conversion/<your conversion id>/imp.gif?value=<?php echo $order_total ?>&label=purchase&script=0">
I hope that answers your question.....
I want to thank the contributors to this thread for their pointers on getting Google AdWords conversion to include the dollar value. This is my first post to this forum, which I joined to asked the following:
I have a couple of remaining concerns about this code. I had to do things my own way, and I wondered why some of the methods shown here didn't work directly. And after getting it to appear in the page source view correctly, it still doesn't display Google's required notification image (imp.gif I think?).
I'm not sure yet whether it actually reports back to Google, as we don't get conversions every day on this site so I can't yet verify the results in AdWords itself. (I'm reluctant to click and ad and run a test order through the system as that will skew the reporting somewhat, but I may have to if I don't see any conversions in a reasonable amount of time.)
My first deviation from the examples in this thread was, I was not able to place my conversion snippet into a separate file such as /includes/modules/pages/checkout_success/js_google_code.php. Instead, I inserted the code directly into a template-override copy of the tpl_checkout_success_default.php file itself (includes/templates/<my_template_name>/templates/tpl_checkout_success_default.php).
Secondly, there seemed to be two different examples shown in this thread, and neither worked for me exactly as given. What I did was to insert code in two places. I placed an SQL call just below the comments at the top of the page before the first ?> to retrieve the order's subtotal value, like so:
This of course depends on the ot_subtotal module being turned on in Admin > Modules > Order Total. I placed Google's snippet at the bottom of the file, where it is followed only by the similar Yahoo! Search Marketing snippet. The Google AdWords snippet looks like this:Code:... * @version $Id: tpl_checkout_success_default.php 5407 2006-12-27 01:35:37Z drbyte $ */ // Lookup order subtotal to report to Google AdWords on conversion (see bottom of this code file) $orders_query = 'SELECT * FROM orders_total WHERE orders_id = ' . $zv_orders_id . ' AND class = "ot_subtotal"'; $orders = $db->Execute($orders_query); $order_subtotal = $orders->fields['value']; ?> ...
..I've compared it (using winmerge) against a freshly downloaded snippet from Google, and they are exactly the same. (On Google, I designated https:// from the drop-down, filled in <?php echo $order_subtotal ?> into the field for the value, and refreshed the snippet. That placed the php code for the sub-total field into the correct place in the fresh snippet.)Code:. <!-- Google AdWords Conversion Code --> <script language="JavaScript" type="text/javascript"> <!-- var google_conversion_id = <my_conversion_id>; var google_conversion_language = "en_US"; var google_conversion_format = "1"; var google_conversion_color = "CC6600"; if (<?php echo $order_subtotal ?>) { var google_conversion_value = <?php echo $order_subtotal ?>; } var google_conversion_label = "purchase"; //--> </script> <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/<my_conversion_id>/imp.gif?value=<?php echo $order_subtotal ?>&label=purchase&script=0"> </noscript> <!-- End Google AdWords Conversion Code --> ...
I tried wrapping the whole thing in a <p> tag or a <div> tag hoping that would force it to show Google's notification image, but no luck. When I run a test order on my test site (not from an AdWords click), the page source view shows me the sub-total value of the order in the proper places, as below (pasted in from source view, except for conversion id):
if (4.9900) {
var google_conversion_value = 4.9900;
}
and again:
Any suggestions in my remaining snags? Once again, they are:HTML Code:<img height=1 width=1 border=0 src="https://www.googleadservices.com/pagead/conversion/<my_conversion_id>/imp.gif?value=[B]4.9900[/B]&label=purchase&script=0">
- Have to insert code into template file tpl_checkout_success_default.php, not in its own separate modules/pages/checkout_success/ file.
- Google's required notification image doesn't appear on screen.
Last edited by Kim; 20 Jul 2007 at 07:06 PM.
Alan,
Here is my personal recommendation on this. I have installed Google Analytics with Conversion Tracking on a large number of sites.
All work without a flaw, and all were done this way. I posted the answer to it a while ago in the Google Analytics Integration thread.
http://www.zen-cart.com/forum/showth...ing#post376521
Last edited by econcepts; 20 Jul 2007 at 05:39 PM. Reason: Altered URL
Eric
20 Ways to Increase Sales Using Zen Cart
Zen Cart contribs: Simple Google Analytics, Export Shipping Information
Eric,
Thanks for the information. I'm sure that's the right way to have done it, but since we've had our own shoe-horn approach to both Analytics and AdWords conversion working for months, and since the only thing I wanted to quickly do was to pick up the order value in place of the 1.0 that was going back, I'd best leave it pretty much as it is for now.
It does appear that the notification icon has disappeared, which may be related to our recent upgrade from 1.2.6 to 1.3.7. So there's that to figure out before Google gets wise and complains about it. But otherwise, it seems to be working, as long as we start to see the dollar values showing up in AdWords reports pretty soon.
One of these mythical days when there's plenty of time left over, I may see if I can convert to the more "standard" way of doing this. I'm curious also about $zv_onload. I don't know what that is, but it looks like it could have saved me from writing my own SQL call. My <body> tag has the conditional code for it that is mentioned in Cuda's ReadMe file in the Google Analytics download, but when I get to checkout_success, there is no onload parameter in the <body> tag in view source. So without peeling too many more layers off of this onion for now, I'll just live with it.
(If ignorance of $zv_onload is an indicator, someone may also want to direct me to some pretty basic intro material on supporting a Zen Cart site. I've been improvising my way through things oh, these many months, whereas I expect there are some best "Zen" practices that I could stand to brush up on. Yes, I know about the "e-Start Your Web Store" manual. That's something we want to get pretty soon, I think.)
I'm still game for a quick fix for my disappearing notification image, but if folks feel reluctant to look at this improvised code, I can understand. I'll just keep at it on my own.
Many thanks.