Results 1 to 10 of 40

Hybrid View

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

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

  3. #3

    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!

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

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

  6. #6
    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!

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

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

 

 

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