Quote Originally Posted by CJPinder View Post
In that case edit includes/templates/YOUR_TEMPLATE/common/tpl_main_page.php (you might have to copy it there first from template_default) and right before the </body> tag add the following...
PHP Code:
<?php
if ($request_type == 'NONSSL') {
    
$google_analytics_url "http://www.google-analytics.com/urchin.js";
} else {
    
$google_analytics_url "https://ssl.google-analytics.com/urchin.js";
}
  echo 
'<script src="' $google_analytics_url '" type="text/javascript">'."\n";
?>
</script>
<script type="text/javascript">
_uacct = "UA-XXXXXXX-X";
urchinTracker();
</script>
...replace the UA-XXXXXXX-X bit with your own number that is given to you in the code snippet on the Google Analytics site.

Regards,
Christian.

Thanks for this tip. It worked for me too! Finally I get something right with no problems.