1
If you happen to know about
Google Analytics some of the easiest way of loading the analytics in the theme is like so.
You create a file in /modules/system/preloader called analytics.php and put the following code in, remember to replace UA-00000000-0 with your analytics account code and the other settings:
le="color: #000000"><?php defined('XOOPS_ROOT_PATH') or die('Restricted access'); class SystemAnalyticsPreload extends XoopsPreloadItem { function eventCoreHeaderAddmeta($args) { if (is_object($GLOBALS['xoTheme'])&&!isset($GLOBALS['analytics'])) { $GLOBALS['analytics'] = true; $GLOBALS['xoTheme']->addScript('', array('type' => 'text/javascript'), " var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-00000000-0']); _gaq.push(['_setDomainName', 'none']); _gaq.push(['_setAllowLinker', true]); _gaq.push(['_trackPageview']); (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); })();"); } } function eventCoreFooterEnd($args) { unset($GLOBALS['analytics']); } }
You will find the code that google gives you if you need to change anything quiet similar to this code and there will be only minor fields to change.