Page 1 of 2 12 LastLast
Results 1 to 10 of 11

need help installing google analytics

This is a discussion on need help installing google analytics within the osCmax v2 Customization/Mods forums, part of the osCmax v2.0 Forums category; i dont know what to do where can somone tell my where a need to make the changes Pour installer ...

      
  1. #1
    Active Member
    Join Date
    Sep 2008
    Location
    holland
    Posts
    145
    Rep Power
    4


    Default need help installing google analytics

    i dont know what to do where

    can somone tell my where a need to make the changes


    Pour installer Google analitycs

    Installer le Nouveau fichier sous son répertoire:
    catalog/includes/modules/analitycs/analitics.php


    Fichier à modifier:
    catalog/includes/footer.php
    catalog/checkout_process.php


    Intaller dans le footer plutot que dans le header le code de tracking suivant:

    <script type="text/javascript">
    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">
    var pageTracker = _gat._getTracker("UA-XXXXXXX-X");
    pageTracker._initData();
    pageTracker._setDomainName("VOTREDOMAINE.com");
    pageTracker._trackPageview();
    <?php
    if (strpos($_SERVER['PHP_SELF'], 'checkout_success.php') !== false)
    include(DIR_WS_MODULES . 'analytics/analytics.php');
    ?>
    </script>


    remplacer VOTREDOMAINE par le nom de votre site et ("UA-XXXXXXX-X") par votre code d'identification analytics.

    Installer ensuite dans checkout_process.php après la ligneenv 300)
    $products_ordered .= $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . ' (' . $order->products[$i]['model'] . ') = ' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . $products_ordered_attributes . "n";

    Le code suivant:

    // GOOGLE ANALYTICS BOF

    session_register('google_analytics');

    $_SESSION['google_analytics'] = 'UTM:T|'.
    $insert_id .
    '|Web Sales|'.$order->info['total'].'|'.
    $order->info['tax'].'|'.
    $order->info['shipping_cost'].'|'.
    $order->customer['city'].'|'.
    $order->customer['state'].'|'.
    $order->customer['country']['iso_code_2']."n".$google_analytics;


    // GOOGLE ANALYTICS EOF

    N'oubliez pas de cocher sur votre compte google analytics e-commerce.
    The seven signs that tell of the coming Armageddon


    1. A decline in the strength of the three major religions. check
    2. Revolutions and internal turmoil in nations around the world. check
    3. War and the rumors of war check
    4. Famine check
    5. Pollution of the earth dubbel check
    6. Earthquakes
    7.The coming of plagues and diseases.

  2. #2
    jpf
    jpf is offline
    osCMax Testing Team
    jpf's Avatar
    Join Date
    Sep 2003
    Location
    Manitoba, Canada
    Posts
    2,688
    Rep Power
    22


    Default Re: need help

    Try google translate:


    To install Google analitycs

    Install the new file as:
    catalog/includes/modules/analitycs/analitics.php


    Files to change:
    catalog/includes/footer.php
    catalog/checkout_process.php


    Install tracking in the footer (rather than in the header code):

    <script type="text/javascript">
    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">
    var pageTracker = _gat._getTracker("UA-XXXXXXX-X");
    pageTracker._initData();
    pageTracker._setDomainName("YOURDOMAIN.com");
    pageTracker._trackPageview();
    <?php
    if (strpos($_SERVER['PHP_SELF'], 'checkout_success.php') !== false)
    include(DIR_WS_MODULES . 'analytics/analytics.php');
    ?>
    </script>


    Replace YOURDOMAIN with the name of your site ( "UA-XXXXXXX-X") by your identification code analytics.


    Then install in checkout_process.php (after line 300)

    $products_ordered .= $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . ' (' . $order->products[$i]['model'] . ') = ' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . $products_ordered_attributes . "n";

    The following code:

    // GOOGLE ANALYTICS BOF

    session_register('google_analytics');

    $_SESSION['google_analytics'] = 'UTM:T|'.
    $insert_id .
    '|Web Sales|'.$order->info['total'].'|'.
    $order->info['tax'].'|'.
    $order->info['shipping_cost'].'|'.
    $order->customer['city'].'|'.
    $order->customer['state'].'|'.
    $order->customer['country']['iso_code_2']."n".$google_analytics;


    // GOOGLE ANALYTICS EOF

    Remember to check on your Google Analytics e-commerce.
    JPF - osCMax Fourm Moderator - To contact, post on the forum or click here
    Try out our osCMax at: Live Catalog Demo
    Limited access Admin: Live Admin Demo
    Feel free to add products they way you want and then purchase them -=+=- Sorry nothing will be billed or shipped!

  3. #3
    Active Member
    Join Date
    Sep 2008
    Location
    holland
    Posts
    145
    Rep Power
    4


    Default Re: need help

    there is no
    catalog/includes/footer.php
    The seven signs that tell of the coming Armageddon


    1. A decline in the strength of the three major religions. check
    2. Revolutions and internal turmoil in nations around the world. check
    3. War and the rumors of war check
    4. Famine check
    5. Pollution of the earth dubbel check
    6. Earthquakes
    7.The coming of plagues and diseases.

  4. #4
    jpf
    jpf is offline
    osCMax Testing Team
    jpf's Avatar
    Join Date
    Sep 2003
    Location
    Manitoba, Canada
    Posts
    2,688
    Rep Power
    22


    Default Re: need help installing google analytics

    I just checked the newest version of OSCOMMERCE 2.2 MS2a - yes the file still exsits. I would recheck your installation.
    JPF - osCMax Fourm Moderator - To contact, post on the forum or click here
    Try out our osCMax at: Live Catalog Demo
    Limited access Admin: Live Admin Demo
    Feel free to add products they way you want and then purchase them -=+=- Sorry nothing will be billed or shipped!

  5. #5
    Active Member
    Join Date
    Sep 2008
    Location
    holland
    Posts
    145
    Rep Power
    4


    Default Re: need help installing google analytics

    i have osCMax 2.0 RC3-0-2 running on my server.
    the only footer.php i can find is in catalog/admin/footer.php
    not in calalog/include/footer.php
    The seven signs that tell of the coming Armageddon


    1. A decline in the strength of the three major religions. check
    2. Revolutions and internal turmoil in nations around the world. check
    3. War and the rumors of war check
    4. Famine check
    5. Pollution of the earth dubbel check
    6. Earthquakes
    7.The coming of plagues and diseases.

  6. #6
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,501
    Rep Power
    567


    Default Re: need help installing google analytics

    You posted in the wrong forum. This is the standard osCommerce forum, so it is assumed that you are asking about standard osCommerce.

    If you are posting about osCMax, then please post in the osCMax forums in the future. I have moved this to the correct forum.
    Michael Sasek
    osCMax Developer


    osCmax installation service - Have our professionals install osCmax on your server - same day service!
    osCmax 2.0 User Manual - the must have beginners guide to osCmax v2.0

    Stay Up To Date with everything osCMax:
    Free osCMax Newsletters - Security notices, New Releases, osCMax News
    osCMax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

  7. #7
    jpf
    jpf is offline
    osCMax Testing Team
    jpf's Avatar
    Join Date
    Sep 2003
    Location
    Manitoba, Canada
    Posts
    2,688
    Rep Power
    22


    Default Re: need help installing google analytics

    For oscmax - the footer is included in mainpage.tpl.php
    JPF - osCMax Fourm Moderator - To contact, post on the forum or click here
    Try out our osCMax at: Live Catalog Demo
    Limited access Admin: Live Admin Demo
    Feel free to add products they way you want and then purchase them -=+=- Sorry nothing will be billed or shipped!

  8. #8
    Member
    Join Date
    Nov 2009
    Posts
    51
    Rep Power
    3


    Default Re: need help installing google analytics

    I have found mainpage.tpl.php fine and implemented the code. I have also placed it in checkout_success.tpl.php, but I am not sure if I have put it in the right spot. Does anyone know where it belongs?

  9. #9
    osCMax Development Team
    pgmarshall's Avatar
    Join Date
    Feb 2009
    Location
    London
    Posts
    2,428
    Rep Power
    48


    Smile Re: need help installing google analytics

    Lightdancer,

    You really should have a look through the Wiki - I have spent a not inconsiderable amount of time updating quite a large chunk of it! There is quite a lot new stuff covering the latest osCMax developments.

    Read this page:
    http://wiki.oscdox.com/google_analytics

    Regards,
    pgmarshall
    _______________________________

  10. #10
    osCMax Development Team
    ridexbuilder's Avatar
    Join Date
    Jul 2008
    Location
    Haggisland
    Posts
    2,944
    Rep Power
    34


    Default Re: need help installing google analytics

    I have tried pointing the horse to water...
    Hosting plans with installation, configuration, contributions, support and maintenance.

Page 1 of 2 12 LastLast

Similar Threads

  1. Google Analytics
    By deaniodice in forum osCommerce 2.2 Discussion
    Replies: 11
    Last Post: 11-10-2008, 01:41 PM
  2. Google Analytics e-commerce
    By tcshadow in forum osCmax v2 Customization/Mods
    Replies: 12
    Last Post: 07-14-2008, 11:20 PM
  3. Google Analytics (beta) with E-commerce
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 01-14-2008, 04:42 AM
  4. Google-Analytics
    By dasmurphy in forum osCmax v2 Customization/Mods
    Replies: 3
    Last Post: 08-24-2006, 10:02 AM
  5. Reviews and google analytics
    By dasmurphy in forum osCmax v2 Installation issues
    Replies: 0
    Last Post: 08-15-2006, 06:28 PM

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
  •