Ricochet Posted March 20, 2007 Posted March 20, 2007 We are installing Google Analytics into our OSCommerce store. Does anyone have experience doing this? We're looking for a straight forward way of adding this javascript code in so that we can track orders thru the system more easily. Any help or information would be greatly appreciated. Thanks in advance Stephen
vasttech Posted March 20, 2007 Posted March 20, 2007 Just add the javascript that google gives you to the includes/footer.php file. That's all there is to it. osCommerce Knowledge Base osCommerce Documentation Contributions
ApD06 Posted July 24, 2007 Posted July 24, 2007 Just add the javascript that google gives you to the includes/footer.php file. That's all there is to it. Hello Jeff, I'm relatively new to PHP so please forgive my ignorance. The instructions that Google provides for installing their Analytics code are pretty straight forward, you place it right before the '</body>' tag on each page (HTML) that you want data collected on. I realize that osCommerce is dynamically driven and the code placement will be different. What I don't have a clue about is where exactly in the footer.php code should I insert the Analytics snippet? Below is my footer code, would you be so kind as to indicate where to place the Google code? Thanks in advance! Alfredo <?php /* $Id: footer.php,v 1.26 2003/02/10 22:30:54 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ require(DIR_WS_INCLUDES . 'counter.php'); ?> <table border="0" width="100%" cellspacing="0" cellpadding="1" height="18"> <tr class="footer"> <td class="footer"> <?php echo strftime(DATE_FORMAT_LONG); ?> </td> <td align="right" class="footer">Copyright © 2001-2007 <?php //echo $counter_now . ' ' . FOOTER_TEXT_REQUESTS_SINCE . ' ' . $counter_startdate_formatted; ?> </td> </tr> <!-- <br> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td align="center" class="smallText"> <?php /* The following copyright announcement can only be appropriately modified or removed if the layout of the site theme has been modified to distinguish itself from the default osCommerce-copyrighted theme. For more information please read the following Frequently Asked Questions entry on the osCommerce support site: http://www.oscommerce.com/community.php/faq,26/q,50 Please leave this comment intact together with the following copyright announcement. */ // echo FOOTER_TEXT_BODY ?> </td> </tr> </table> <?php //if ($banner = tep_banner_exists('dynamic', '468x50')) { ?> <br> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td align="center"><?php //echo tep_display_banner('static', $banner); ?></td> </tr> </table> <?php // } ?> -->
Recommended Posts
Archived
This topic is now archived and is closed to further replies.