Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 40
  1. #11
    Join Date
    Jan 2007
    Posts
    1
    Plugin Contributions
    0

    Default Re: Google Adwords Conversion Tracking code help.

    Quote Originally Posted by Alex Clarke View Post
    Can't you just subscribe to Google Analytics and install the Google Analytics contribution for Zen Cart?

    Then you should get full stats and adword tracking! :)
    You get full stats but not conversion tracking which is what he is going for here. BTW Thanks alot for figuring this out as it is a huge help for keeping track of ROI.

    Jeremy

  2. #12
    Join Date
    Oct 2006
    Posts
    10
    Plugin Contributions
    0

    Default Re: Google Adwords Conversion Tracking code help.

    Quote Originally Posted by vector0319 View Post
    You get full stats but not conversion tracking which is what he is going for here. BTW Thanks alot for figuring this out as it is a huge help for keeping track of ROI.

    Jeremy
    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.

  3. #13
    Join Date
    Apr 2006
    Location
    Baltimore
    Posts
    42
    Plugin Contributions
    0

    Default Re: Google Adwords Conversion Tracking code help.

    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!

  4. #14
    Join Date
    Oct 2004
    Posts
    1,045
    Plugin Contributions
    0

    Default Re: Google Adwords Conversion Tracking code help.

    Quote Originally Posted by Jivananda View Post
    I have figured out how to get the total if anyone is interested:

    put the following in the jscript_google.php file as mentioned before:


    <?php

    ##Table: zen_orders
    ##Field: order_total
    ## is the order id
    $orders_query = "SELECT * FROM zen_orders
    WHERE orders_id = " . $zv_orders_id ."
    LIMIT 1";
    $orders = $db->Execute($orders_query);
    $order_total = $orders->fields['order_total'];

    ?>

    <!-- Google Code for purchase Conversion Page -->
    <script language="JavaScript" type="text/javascript">
    <!--
    var google_conversion_id = <your conversion id>;
    var google_conversion_language = "en_US";
    var google_conversion_format = "1";
    var google_conversion_color = "6633CC";
    if (<?php echo $order_total ?>) {
    var google_conversion_value = <?php echo $order_total ?>;
    }
    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/<your conversion id>/?value=<?php echo $order_total ?>&label=purchase&script=0">
    </noscript>

    And it works!
    I tried this but it's not counting anything now. Does anyone have the conversion value working correctly?

    Thanks!
    Danielle

  5. #15
    Join Date
    Oct 2006
    Posts
    10
    Plugin Contributions
    0

    Default Re: Google Adwords Conversion Tracking code help.

    Quote Originally Posted by Danielle View Post
    I tried this but it's not counting anything now. Does anyone have the conversion value working correctly?

    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

  6. #16
    Join Date
    Oct 2005
    Posts
    78
    Plugin Contributions
    0

    Default Re: Google Adwords Conversion Tracking code help.

    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

  7. #17
    Join Date
    Oct 2006
    Posts
    10
    Plugin Contributions
    0

    Default Re: Google Adwords Conversion Tracking code help.

    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.....

  8. #18
    Join Date
    Jul 2007
    Location
    Durham, NC
    Posts
    55
    Plugin Contributions
    1

    Default Re: Google Adwords Conversion Tracking code help.

    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:
    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'];
    
    ?>
    ...
    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:
    .
    <!-- 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'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.)

    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:
    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">
    Any suggestions in my remaining snags? Once again, they are:
    - 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.

  9. #19
    Join Date
    Dec 2005
    Posts
    1,509
    Plugin Contributions
    6

    Default Re: Google Adwords Conversion Tracking code help.

    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

  10. #20
    Join Date
    Jul 2007
    Location
    Durham, NC
    Posts
    55
    Plugin Contributions
    1

    Default Re: Google Adwords Conversion Tracking code help.

    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.

 

 
Page 2 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. v139h Google Analytics Conversion Tracking code install
    By split63 in forum General Questions
    Replies: 7
    Last Post: 17 Dec 2015, 04:09 AM
  2. Adwords conversion tracking
    By SEJ1 in forum General Questions
    Replies: 2
    Last Post: 20 Nov 2009, 06:44 AM
  3. Google Adwords Conversion Tracking - how do I add it?
    By barrystein in forum General Questions
    Replies: 0
    Last Post: 14 Apr 2009, 02:16 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg