Page 55 of 68 FirstFirst ... 545535455565765 ... LastLast
Results 541 to 550 of 672
  1. #541
    Join Date
    Jan 2009
    Posts
    18
    Plugin Contributions
    0

    Default Re: Google Analytics Integration

    I cannot get eCommerce tracking through GA to work on a new zen cart implementation, nor can I find a simple walkthrough showing where and what code I need to add.

    Can anyone help?

    Thank you in advance,
    Ben

  2. #542
    Join Date
    Dec 2008
    Location
    San Fran
    Posts
    382
    Plugin Contributions
    0

    Default Re: Google Analytics Integration


  3. #543
    Join Date
    Aug 2006
    Posts
    6
    Plugin Contributions
    0

    Default Re: Google Analytics Integration

    Quote Originally Posted by swamyg1 View Post
    hi
    I have some issues installing INSTALL.SQL code . After that
    it shows


    1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Google Analytics Configuration'' LIMIT 1' at line 1
    in:

    I donīt have what happened there?
    could i have some help?
    thanks in advance

  4. #544
    Join Date
    Feb 2009
    Posts
    3
    Plugin Contributions
    0

    red flag I'm having trouble finding the file!

    Hi,
    I'm installing Google analytics for the first time. In the readme file it says:

    2. Make sure your body tag in /includes/templates/[your_template]/common/tpl_main_page.php
    includes this code (if not see trouble shooting below it is not neccassary but an addition
    to your template needs to be made):


    But I don't have a folder called /includes/templates/[your_template]/common/ and the only place that I find the file tpl_main_page.php in /includes/templates/template_default/common.

    Ps. I understand that [your_template] must me replaced with my template folder name, which is in my case mostlygrey

    Thanks in advance.

  5. #545
    Join Date
    Feb 2007
    Location
    Barcelona
    Posts
    201
    Plugin Contributions
    0

    Default Re: Google Analytics Integration

    Quote Originally Posted by bhakans View Post
    Update: I PM:ed Andrew and he answered that another update of the module might be needed to fix this.
    Me too (same problem since December, afetr months of working properly) Any news about the update of the module?

  6. #546
    Join Date
    Feb 2007
    Location
    Barcelona
    Posts
    201
    Plugin Contributions
    0

    Default Re: I'm having trouble finding the file!

    Quote Originally Posted by daven613 View Post
    Hi,
    I'm installing Google analytics for the first time. In the readme file it says:

    2. Make sure your body tag in /includes/templates/[your_template]/common/tpl_main_page.php
    includes this code (if not see trouble shooting below it is not neccassary but an addition
    to your template needs to be made):

    But I don't have a folder called /includes/templates/[your_template]/common/ and the only place that I find the file tpl_main_page.php in /includes/templates/template_default/common.
    You must create a directory with this path and copy inside the file tpl_main_page.php from /includes/templates/template_default/common

  7. #547
    Join Date
    May 2005
    Posts
    75
    Plugin Contributions
    0

    Default Re: Google Analytics Integration

    I'm trying to add the code to this mode to treat certain keywords or URLs as direct referrals instead of keywords.

    Here's the affected part of my code (just the part between
    Code:
    <script type=quot;text/javascript"> and </script>
    )
    Code:
    <script type="text/javascript">
    <!--
    if(!gaJsHost) {
    var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
    document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
    }
    //-->
    </script>
    <script type="text/javascript">
    <!--
    if(!pageTracker) {
    var pageTracker = _gat._getTracker('<?php echo GOOGLE_ANALYTICS_UACCT; ?>');
    pageTracker._addIgnoredOrganic("www.mydomainvariation.com");
    pageTracker._addIgnoredOrganic("domainvariation");
    pageTracker._addIgnoredOrganic("\"domain variation\"");
    <?php if(GOOGLE_ANALYTICS_DOMAINNAME != '') { ?>
    pageTracker._setDomainName('<?php echo GOOGLE_ANALYTICS_DOMAINNAME; ?>');
    <?php } ?>
    <?php if(GOOGLE_ANALYTICS_ALLOWLINKER == 'true') { ?>
    pageTracker._setAllowLinker(true);
    <?php } ?>
    pageTracker._initData();
    pageTracker._trackPageview(<?php echo $google_analytics_page; ?>);
    }
    <?php
    // http://www.google.ru/support/googleanalytics/bin/answer.py?answer=55528
    if($_GET['main_page'] == FILENAME_CHECKOUT_SUCCESS && (!isset($_SESSION['google_analytics']) || !in_array($zv_orders_id, $_SESSION['google_analytics']))) {
      if(!isset($_SESSION['google_analytics'])) $_SESSION['google_analytics'] = array();
      $_SESSION['google_analytics'][] = $zv_orders_id;
      $_trackTrans = '';
      require_once(DIR_WS_CLASSES . 'order.php');
      $order = new order($zv_orders_id);
    //echo '<pre>';var_export($order);echo '</pre>';
      switch (GOOGLE_ANALYTICS_TARGET) {
        case 'delivery':
          $google_analytics = $order->delivery;
          break;
        case 'billing':
          $google_analytics = $order->billing;
          break;
        case 'customers':
        default:
          $google_analytics = $order->customer;
          break;
      }
    
      $google_analytics['ot_shipping'] = 0;
      $totals = $db->Execute("SELECT value
                              FROM " . TABLE_ORDERS_TOTAL . "
                              WHERE orders_id = '" . (int)$zv_orders_id . "'
                                AND class = 'ot_shipping'");
      if (!$totals->EOF) {
        $google_analytics['ot_shipping'] = $totals->fields['value'];
      }
    /*
      foreach ($order->totals as $k => $v) {
        var_dump($v['class'], $v['text']);echo '<br />';
        if($v['class'] == '') {
          $google_analytics['ot_shipping'] = float($v['text']);
          break;
        }
      }
    */
    //  pageTracker._addTrans(Order_ID, Affiliation, Total, Tax, Shipping, City, State, Country);
      $_trackTrans .= '  pageTracker._addTrans(' .
                      '"' . $zv_orders_id . '",' .
                      '"' . GOOGLE_ANALYTICS_AFFILIATION . '",' .
                      '"' . number_format($order->info['total'], 3, '.', '') . '",' .
                      '"' . number_format($order->info['tax'], 3, '.', '') . '",' .
                      '"' . number_format($google_analytics['ot_shipping'], 3, '.', '') . '",' .
                      '"' . zen_output_string_protected($google_analytics['city']) . '",' .
                      '"' . zen_output_string_protected($google_analytics['state']) . '",' .
                      '"' . zen_output_string_protected($google_analytics['country']) . '");' . "\n";
    
      for ($i=0; $i<sizeof($order->products); $i++) {
    /*
        $category_query = "SELECT cd.categories_name
                           FROM " . TABLE_PRODUCTS . " p
                             LEFT JOIN " . TABLE_CATEGORIES_DESCRIPTION . " cd ON (cd.categories_id = p.master_categories_id)
                           WHERE p.products_id = :productsID
                             AND cd.language_id = :languagesID
                           LIMIT 1";
        $category_query = $db->bindVars($category_query, ':languagesID', $_SESSION['languages_id'], 'integer');
        $category_query = $db->bindVars($category_query, ':productsID', zen_get_prid($order->products[$i]['id']), 'integer');
        $category = $db->Execute($category_query);
        $categories_name = $category->fields['categories_name'];
    */
        $categories_name = zen_get_categories_name_from_product(zen_get_prid($order->products[$i]['id']));
        if(GOOGLE_ANALYTICS_SKUCODE == 'products_model') {
          $products_skucode = $order->products[$i]['model'];
        } else {
          $products_skucode = $order->products[$i]['id'];
        }
        $products_attributes_name = '';
        if (isset($order->products[$i]['attributes'])) {
          for ($j=0; $j<sizeof($order->products[$i]['attributes']); $j++) {
            $products_attributes_name .= $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value'] . GOOGLE_ANALYTICS_PRODUCTS_ATTRIBUTES_DELIMITER;
          }
          $products_attributes_name = substr(GOOGLE_ANALYTICS_PRODUCTS_ATTRIBUTES_BRACKETS, 0, 1) . rtrim($products_attributes_name, GOOGLE_ANALYTICS_PRODUCTS_ATTRIBUTES_DELIMITER) . substr(GOOGLE_ANALYTICS_PRODUCTS_ATTRIBUTES_BRACKETS, 1, 1);
        }
    //   pageTracker._addItem(Order_ID, SKU, Product_Name, Category, Price, Quantity);
        $_trackTrans .= '  pageTracker._addItem(' .
                        '"' . $zv_orders_id . '",' .
                        '"' . zen_output_string_protected($products_skucode) . '",' .
                        '"' . zen_output_string_protected($order->products[$i]['name'] . $products_attributes_name) . '",' .
                        '"' . zen_output_string_protected($categories_name) . '",' .
                        '"' . number_format($order->products[$i]['final_price'], 2, '.', '') . '",' .
                        '"' . $order->products[$i]['qty'] . '");' . "\n";
      }
      $_trackTrans .= 'pageTracker._trackTrans();' . "\n";
      echo $_trackTrans;
    }
    ?>
    //-->
    </script>
    However, the keywords related to my domain that I'm trying to supress are still showing add adding traffic to the Keywords part of Analytics, rather than moving that traffic into Direct.

    Any ideas what is wrong with the code?

    I notice on the support site on Google for achieving this, http://www.google.com/support/google...y?answer=55479, there is one discrepancy between their code and this code:

    Google says:
    Code:
    pageTracker._trackPageview();
    This code says:
    Code:
    pageTracker._trackPageview(<?php echo $google_analytics_page; ?>);
    Any help is greatly appreciated.

    Thanks for the great mod.

  8. #548
    Join Date
    Mar 2008
    Posts
    67
    Plugin Contributions
    0

    Default Re: Google Analytics Integration

    my god you instructions bite ! ..... the mod itself looks promising... but youve ruined it with shoddy instructions mate.

    is anyone able to shed some light on this rubbish ?

    2. EDIT:
    tpl_footer.php or tpl_main_page.php or any other that you want.
    (for example: copy template_default/common/tpl_footer.php then edit and save in YOUR_TEMPLATE/common/ directory).
    To any place that you want add
    <?php include($template->get_template_dir('tpl_footer_googleanalytics.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_footer_googleanalytics.php'); ?>
    For ex. to the bottom of the tpl_footer.php.
    i mean honestly .... what the #!#@ does that mean ?!
    Last edited by accurax; 7 Mar 2009 at 11:57 AM.

  9. #549
    Join Date
    Aug 2004
    Location
    Saint Petersburg, Russia
    Posts
    1,786
    Plugin Contributions
    13

    Default Re: Google Analytics Integration

    accurax,
    Don't use this module, if you can't comply with such primitive instructions. You certainly will be more problems.

  10. #550
    Join Date
    Aug 2008
    Location
    India
    Posts
    3
    Plugin Contributions
    0

    Default Re: Google Analytics Integration

    Hi,

    I have integrated Google Analytic in my zen-cart. After setting up my account there on Google site it is showing in check status section as receiving data like this...



    However it is showing error on overview & website profile page like this.....



    I try and find the same with latest code given by Google Analytics is this...



    Which doesn't match with the code at the page source as a result by implementing Google Analytics in Zen-Cart, which is this...



    What i am able to rectify the problem is the code executed by zencart module is inside the comment tags, thats why not able to run.

    Can Anybody solve this problem for me..

    Hope to hear from anyone with a solution for this.

    Regards,

    Aakash Tomar

 

 
Page 55 of 68 FirstFirst ... 545535455565765 ... LastLast

Similar Threads

  1. Google Analytics: Site Search Integration
    By saitomedia in forum General Questions
    Replies: 1
    Last Post: 29 Jul 2010, 08:08 AM
  2. google analytics integration
    By amnon_d in forum General Questions
    Replies: 3
    Last Post: 14 Jul 2009, 12:04 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