Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 21
  1. #11
    Join Date
    Aug 2005
    Posts
    334
    Plugin Contributions
    0

    Default Re: Google Analytics "google_conversion_value" - what value do I use?

    Thank you.

    I think I understood your suggestion.

    Will modify my lines, test and report.

  2. #12
    Join Date
    Aug 2005
    Posts
    334
    Plugin Contributions
    0

    Default Re: Google Analytics "google_conversion_value" - what value do I use?

    Hello,

    1. I generated following code at Google Conversion rate setting page:

    <!-- Google Code for Medical Id Bracelets Conversion Page -->
    <script type="text/javascript">
    /* <![CDATA[ */
    var google_conversion_id = 222222;
    var google_conversion_language = "en";
    var google_conversion_format = "1";
    var google_conversion_color = "ffffff";
    var google_conversion_label = "tttttttttttttttt";
    var google_conversion_value = <?php echo $order_summary['order_total']; ?>
    /* ]]> */
    </script>
    <script type="text/javascript" src="http://www.googleadservices.com/pagead/conversion.js">
    </script>
    <noscript>
    <div style="display:inline;">
    <img height="1" width="1" style="border-style:none;" alt="" src="http://www.googleadservices.com/pagead/conversion/222222/?value=<?php echo $order_summary['order_total']; ?>&amp;label=tttttttttttttttt&amp;guid=ON&amp;script=0"/>
    </div>
    </noscript>

    2. I placed it here (in the end):
    .../includes/templates/your_template/checkout_success/tpl_footer.php

    3. I simulated purchase and opened View Source of

    http://www.your_domain.com/store/ind...ckout_success:

    4. There was code in the end of file:

    ..........................................
    </table>
    <!--bof-navigation display -->
    <div id="navSuppWrapper">
    <div id="navSupp">
    <ul>
    <li><a href="http://www.your_domain.com/store/">Store</a></li>
    </ul>
    </div>
    </div>
    <!--eof-navigation display -->

    <!--bof-ip address display -->
    <!--eof-ip address display -->

    <!--bof-banner #5 display -->
    <!--eof-banner #5 display -->

    <!--bof- site copyright display -->
    <div id="siteinfoLegal" class="legalCopyright">Copyright &copy; 2012 <a href="http://www.your_domain.com" target="_blank"> </a>- 2015. <a href="http://www.your_domain.com" target="_blank">Idtagsonline.com</a></div>
    <!--eof- site copyright display -->

    <script language="JavaScript" type="text/javascript" src="http://www.your_domain.com/affiliates/sale.php?amount=32.99&trans_id=9484"></script></td></tr>

    </table>
    #######################################
    ## START GOOGLE ANALITYCS CONVERSION ##
    #######################################
    <!-- Google Code for Medical Id Bracelets Conversion Page -->
    <script type="text/javascript">
    /* <![CDATA[ */
    var google_conversion_id = 1063694528;
    var google_conversion_language = "en";
    var google_conversion_format = "1";
    var google_conversion_color = "ffffff";
    var google_conversion_label = "CF7ZCOiZ5wMQwOGa-wM";
    var google_conversion_value = ;
    /* ]]> */
    </script>
    <script type="text/javascript" src="http://www.googleadservices.com/pagead/conversion.js">
    </script>
    <noscript>
    <div style="display:inline;">
    <img height="1" width="1" style="border-style:none;" alt="" src="http://www.googleadservices.com/pagead/conversion/1063694528/?value=&amp;label=CF7ZCOiZ5wMQwOGa-wM&amp;guid=ON&amp;script=0"/>
    </div>
    </noscript>
    #######################################
    ## E N D GOOGLE ANALITYCS CONVERSION ##
    #######################################</div>
    <!--bof- parse time display -->
    <!--eof- parse time display -->
    <!--bof- banner #6 display -->
    <!--eof- banner #6 display -->
    </body></html>
    ################################################################################

    Does it look right?

    Thank you for looking.

  3. #13
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: Google Analytics "google_conversion_value" - what value do I use?

    Looks right other than there's no amount there.

    What version of Zen Cart are you using?
    What mods/addons/plugins do you have installed?
    What template are you using?
    .

    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. #14
    Join Date
    Aug 2005
    Posts
    334
    Plugin Contributions
    0

    Default Re: Google Analytics "google_conversion_value" - what value do I use?

    What version of Zen Cart are you using? 1.3.9

    What mods/addons/plugins do you have installed? "Jarox affiliate program (working)", "Monthly report"

    What template are you using? "Custom template"

  5. #15
    Join Date
    Aug 2005
    Posts
    334
    Plugin Contributions
    0

    Default Re: Google Analytics "google_conversion_value" - what value do I use?

    I found older post by Jivananda (http://www.zen-cart.com/showthread.p...king-code-help)

    There is suggestion to use variable <?php echo $order_total ?>;} instead of <?php echo $order_summary['order_total']; ?>

    Could it be my problem of not passing value?

    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!

  6. #16
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: Google Analytics "google_conversion_value" - what value do I use?

    You said you're using "v1.3.9". There were 8 editions, a-thru-h. Which one are you using?

    If using $order_summary['order_total'] isn't working for you, then you've apparently got a very old version of /includes/modules/pages/checkout_success/header_php.php on your server.

    So, you can either use the more accurate $order_summary['order_total'] , or if you can't get that to work because your code is different than normal Zen Cart code, then go ahead and use what Jivananda posted.
    .

    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.

  7. #17
    Join Date
    Aug 2005
    Posts
    334
    Plugin Contributions
    0

    Default Re: Google Analytics "google_conversion_value" - what value do I use?

    I am sorry, I am worse than this.
    My version is older:

    Zen Cart 1.3.7.1
    Database Patch Level: 1.3.7

    I will try both suggestions.

    Thank you.

  8. #18
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Google Analytics "google_conversion_value" - what value do I use?

    V1.3.7.1? Seriously? You really need to spend your time on upgrading to a newer secure version (v1.3.9h at least, preferably v1.5.1) or you will get hacked sooner or later... and that will take more time to fix than upgrading will take.

  9. #19
    Join Date
    Aug 2005
    Posts
    334
    Plugin Contributions
    0

    Default Re: Google Analytics "google_conversion_value" - what value do I use?

    Variable <?php echo $order_total ?> did not work.

    <!-- Google Code for Medical Id Bracelets Conversion Page -->
    <script type="text/javascript">
    /* <![CDATA[ */
    var google_conversion_id = 222222;
    var google_conversion_language = "en";
    var google_conversion_format = "1";
    var google_conversion_color = "ffffff";
    var google_conversion_label = "tttttttttttttttt";
    var google_conversion_value = <?php echo $order_total ?>
    /* ]]> */
    </script>
    <script type="text/javascript" src="http://www.googleadservices.com/pagead/conversion.js">
    </script>
    <noscript>
    <div style="display:inline;">
    <img height="1" width="1" style="border-style:none;" alt="" src="http://www.googleadservices.com/pagead/conversion/222222/?value=<?php echo $order_total ?>&amp;label=tttttttttttttttt&amp;guid=ON&amp;script=0"/>
    </div>
    </noscript>

    There is no error messages, but in in source file (html) there is no any value passing.

  10. #20
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: Google Analytics "google_conversion_value" - what value do I use?

    Sounds like you skipped the rest of the code you quoted from Jivananda:
    Code:
    <?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'];
    
    ?>
    .

    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.

 

 
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. v151 "PHP Warning: Creating default object from empty value" what is this?
    By gsmsalers in forum General Questions
    Replies: 3
    Last Post: 9 May 2014, 06:54 PM
  2. "__gat is undefined" error from Google Analytics code
    By jabbawest in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 13 Sep 2010, 02:07 PM
  3. Display "Best Sellers" like "What's New" or "Specials" lists.
    By jsmooth in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 22 Jun 2010, 12:06 AM
  4. no "body" tag in view source after installing the Simple Google Analytics module
    By notageek in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 19 May 2010, 04:31 AM
  5. "Google Analytics by Andrew" Proper Configuration??
    By C_R_C in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 23 Nov 2009, 08:19 PM

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