Page 1 of 11 123 ... LastLast
Results 1 to 10 of 108
  1. #1
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,023
    Plugin Contributions
    32

    Default Google Ecommerce Tracking

    Found multiple posts with no clear answers on this.. Found the code below for adding Google ecommerce tracking in an old post.
    Can someone confirm this is correct or guide me to WHERE I might find the right code for Zen Cart to add ecommerce tracking..

    Code:
    <script type="text/javascript">
    
    var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-xxxxxx-1']);
      _gaq.push(['_trackPageview']);
      _gaq.push(['_addTrans','<?php echo $zv_orders_id ?>','','<?php echo $zv_order_total_cd ?>','<?php echo $zv_order_tax ?>','<?php echo $order_summary['shipping'] ?>','<?php echo $zv_order_city ?>','<?php echo $zv_order_state ?>','<?php echo $zv_order_country ?>']);
    
      _gaq.push(['_addItem','<?php // Loop through products purchased to track in Google (these come from the "cart_orders_products TABLE)
    //sku = "products_model"; productname = "products_name"; category = ""; price = "final_price"; quantity = "products_quantity"
    $products_displayed_google = array();
    for ($i=0, $n=sizeof($products_array_google); $i<$n; $i++) {
    if (!in_array($products_array_google[$i]['id'], $products_displayed_google)) {
    echo  $zv_orders_id . '\',
    \'' . $products_array_google[$i]['model'] . '\',
    \'' . $products_array_google[$i]['text'] . '\',
    \'\',
    \'' . $products_array_google[$i]['price'] . '\',
    \'' . $products_array_google[$i]['quantity'] . '\'
    ' . ((($i+1)<$n) ? ',\'' : '' ) ;
    
    }
    }
    
    ?>])
      _gaq.push(['_trackTrans']); //submits transaction to the Analytics servers
    
      (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
      })();
       __utmSetTrans()
    
    </script>
    Last edited by DivaVocals; 30 Apr 2015 at 09:41 AM.
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  2. #2
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,846
    Plugin Contributions
    25

    Default Re: Google Ecommerce Tracking

    I think I saw that code in the latest Easy Google Analytics mod

  3. #3
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,023
    Plugin Contributions
    32

    Default Re: Google Ecommerce Tracking

    Quote Originally Posted by Design75 View Post
    I think I saw that code in the latest Easy Google Analytics mod
    I do know it's there, but I ONLY need/want the Google ecommerce tracking (regular Analytics tracking is handled).. Do you know offhand if there is there a way to activate JUST the Google ecommerce tracking using the Easy Google Analytics module?
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  4. #4
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,846
    Plugin Contributions
    25

    Default Re: Google Ecommerce Tracking

    Quote Originally Posted by DivaVocals View Post
    I do know it's there, but I ONLY need/want the Google ecommerce tracking (regular Analytics tracking is handled).. Do you know offhand if there is there a way to activate JUST the Google ecommerce tracking using the Easy Google Analytics module?
    no sorry i do not. I have not had the chance to use it yet.

  5. #5
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Google Ecommerce Tracking

    Quote Originally Posted by DivaVocals View Post
    I do know it's there, but I ONLY need/want the Google ecommerce tracking (regular Analytics tracking is handled).. Do you know offhand if there is there a way to activate JUST the Google ecommerce tracking using the Easy Google Analytics module?
    I'm in the final stages of testing some ec analytics code as we speak (actually, I've been testing and tweaking since just before xmas) and am just about at the stage where it would be good to have another set of eyes check it out.

    I have to admit, I've never used the Easy Analytics module and I have no idea if using my module in conjunction with this will cause any conflicts anywhere. My code has been created specifically for the EC tracking, but it also tracks some of the other common 'events' (and all pageviews).

    My code doesn't require any changes to any of the zencart files. Just 4 new files to upload (with one of those needing to have the UA-xxxxxxx.x number inserted.

    Let me know if you are interested in being a guinea pig. Just one thing to keep in mind - There is no way to 'undo' any data submitted to the Google Analytics, so if something goes amiss (such as the same data being logged twice) you'll be stuck with the results/report.

    Cheers
    RodG

  6. #6
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,023
    Plugin Contributions
    32

    Default Re: Google Ecommerce Tracking

    Quote Originally Posted by RodG View Post
    I'm in the final stages of testing some ec analytics code as we speak (actually, I've been testing and tweaking since just before xmas) and am just about at the stage where it would be good to have another set of eyes check it out.

    I have to admit, I've never used the Easy Analytics module and I have no idea if using my module in conjunction with this will cause any conflicts anywhere. My code has been created specifically for the EC tracking, but it also tracks some of the other common 'events' (and all pageviews).

    My code doesn't require any changes to any of the zencart files. Just 4 new files to upload (with one of those needing to have the UA-xxxxxxx.x number inserted.

    Let me know if you are interested in being a guinea pig. Just one thing to keep in mind - There is no way to 'undo' any data submitted to the Google Analytics, so if something goes amiss (such as the same data being logged twice) you'll be stuck with the results/report.

    Cheers
    RodG
    Rod I could kiss you!!! YES I'll guinea pig it, and accept the caveat/risk.. (the risk is minor in the scheme of things) I am NOT using any Google Analytics plugin because this site is one of my WordPress/Zen Cart integration sites, and I am using the WordPress Google Analytics plugin to grab those stats for both WordPress and Zen Cart.. The WordPress plugin obviously doesn't support Google Ecommerce Analytics for Zen Cart (there are plugins for WooCommerce, etc). So I only need the Google Ecommerce Analytics for Zen Cart.
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  7. #7
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Google Ecommerce Tracking

    Quote Originally Posted by DivaVocals View Post
    YES I'll guinea pig it, and accept the caveat/risk.
    <snip>
    So I only need the Google Ecommerce Analytics for Zen Cart.
    I've just sent you a PM with a link to download.

    If anyone else wishes to be a guinea pig please PM me.

    Cheers
    RodG

    ps. This is/will be a free plugin/addon

  8. #8
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,023
    Plugin Contributions
    32

    Default Re: Google Ecommerce Tracking

    Installed like a DREAM.. Works like a charm!!! Rod, it's official.. You are my future ex-husband!!! (my silly, late night, sleep deprived way of saying you ROCK and thank you!!!)
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  9. #9
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Google Ecommerce Tracking

    Quote Originally Posted by DivaVocals View Post
    Installed like a DREAM.. Works like a charm!!! Rod, it's official.. You are my future ex-husband!!! (my silly, late night, sleep deprived way of saying you ROCK and thank you!!!)
    Thanks. I'll give you a few days or so to accumulate more data and identify any problems before I upload it here.

    Cheers
    RodG

  10. #10
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,023
    Plugin Contributions
    32

    Default Re: Google Ecommerce Tracking

    Quote Originally Posted by RodG View Post
    Thanks. I'll give you a few days or so to accumulate more data and identify any problems before I upload it here.

    Cheers
    RodG
    Sure thing.. will let you know.. Got real data since my 2 test sales.. So far still GREAT!!!
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

 

 
Page 1 of 11 123 ... LastLast

Similar Threads

  1. Replies: 6
    Last Post: 3 Oct 2013, 10:36 PM
  2. Ecommerce Tracking code for Google Analytics
    By Endre in forum General Questions
    Replies: 7
    Last Post: 14 Nov 2012, 03:20 PM
  3. MailChimp Ecommerce MC360 tracking?
    By irishshopper in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 26 Oct 2010, 11:21 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR