Ok MB1 this is the code that should be at the bottom of your template (includes/templates/yourtemplate/common/tpl_main_page.php) just before the </body> tag (the code you posted is just the standard code from google and is included in the google_analytics.php file which you should have uploaded to your server in a folder named 'google_analytics'):
So the code above is all that should be at the bottom of your template.... is it?
require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');
This module, in theory, should take care of the rest. You will have to enter your google analytics account number in your admin->configuration->google analytics configuration.
Remove the code provided by google and replace with the above Follow step 3. Then reload your site and view the source and at the bottom you should see the proper tracking code if everything is functioning properly. Let me know