Page 1 of 4 123 ... LastLast
Results 1 to 10 of 40
  1. #1
    Join Date
    Jul 2005
    Posts
    124
    Plugin Contributions
    0

    Default Google Adwords Conversion Tracking code help.

    I want to insert the google adwords conversion tracking code on my checkout success page which would be /includes/languages/english/checkout_success.php

    Now, would the code:
    Code:
    <!-- Google Code for purchase Conversion Page -->
    <script language="JavaScript" type="text/javascript">
    <!--
    var google_conversion_id = MY UNIQUE CODE NUMBER;
    var google_conversion_language = "en_US";
    var google_conversion_format = "1";
    var google_conversion_color = "F0E0D1";
    if (1) {
      var google_conversion_value = 1;
    }
    var google_conversion_label = "purchase";
    //-->
    </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/MY UNIQUE CODE NUMBER/?value=1&label=purchase&script=0">
    </noscript>
    work in that checkout_success.php page without any other modifications?

    Thank you in advance.

  2. #2
    Join Date
    Jul 2005
    Posts
    124
    Plugin Contributions
    0

    Default Re: Google Adwords Conversion Tracking code help.

    It's been a couple of days and there has not been any answer to this thread, so I thought I'd drop in to check again if anyone knows. I still cannot figure it out.
    Thanks in advance.

  3. #3
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Google Adwords Conversion Tracking code help.

    yes, just paste that code into a new file, called /includes/modules/pages/checkout_success/jscript_google_purchase.js

    Without any modifications, you'll get a value of "1" submitted for each time someone gets to the checkout-success page.

    If you want something other than "1", you'll have to customize code.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  4. #4
    Join Date
    Jul 2005
    Posts
    124
    Plugin Contributions
    0

    Default Re: Google Adwords Conversion Tracking code help.

    Thank you so much DrByte! I'll try this out! Now if only they would send some business my way huh? LOL

  5. #5
    Join Date
    Jul 2005
    Posts
    29
    Plugin Contributions
    0

    Default Re: Google Adwords Conversion Tracking code help.

    "yes, just paste that code into a new file, called /includes/modules/pages/checkout_success/jscript_google_purchase.js"


    Hello,

    I have read other posts that say to call the file like jscript_google.php does it matter, even for older version of zencart?


    Thanks

  6. #6

    Default Re: Google Adwords Conversion Tracking code help.

    Quote Originally Posted by toosquare View Post

    Hello,

    I have read other posts that say to call the file like jscript_google.php does it matter, even for older version of zencart?

    Thanks
    toosquare, you are correct! I just tried it with 2 sites (1.2.5 and 1.3.0.2) and they both did NOT work with the file named with .js but did work when named with .php
    Thanks for the tip!

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

    Default Re: Google Adwords Conversion Tracking code help.

    Aloha,

    I'm trying to get my conversion tracking to work. I have the code appearing on the page, but want the conversion to include the value of the conversion (ie the total of the order). What is the variable for the total of the order at the checkout_success page?

    I've tried <?php echo TEXT_YOUR_TOTAL; ?> but that doesn't work.

    Any help is appreciated.

  8. #8
    Join Date
    May 2006
    Posts
    14
    Plugin Contributions
    0

    Default Re: Google Adwords Conversion Tracking code help.

    Jivananda and all,
    I just finished a chat with Google and to change the value for the order in their code, find the line in the code that reads:

    if (Total_Cost) {
    var google_conversion_value = 1;
    }

    and change the value to:

    if (Total_Cost) {
    var google_conversion_value = Total_Cost;
    }

    This will then return the total amount of the order placed through your cart. Hope that helps.

  9. #9
    Join Date
    Oct 2006
    Posts
    10
    Plugin Contributions
    0

    Default Re: Google Adwords Conversion Tracking code help.

    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!

  10. #10
    Join Date
    Mar 2006
    Posts
    919
    Plugin Contributions
    2

    Default Re: Google Adwords Conversion Tracking code help.

    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! :)

 

 
Page 1 of 4 123 ... 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