Quote Originally Posted by ArthurC View Post
This is a long long thread. My problem may have been resolved before but I can't find the fix.

Step 3 in the installation of the Simple Google Analytics requires a line of code to be inserted just before the </body> tag at the end of tpl_main_page.php. I did that. The code now looks like this:

Code:
<!--eof- banner #6 display -->
<?php
require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');
?>
</body>
And when I run the code, the page source ends like this:

Code:
<!--eof- banner #6 display -->
That's it. No analytics code. Even lost the </body> tag.

What am I missing, please.
Aurthur,

Insert the code as stated in step 3 (into the tpl_main_page.php NOT the footer file).

If you got that installed and the rest of the contribution is in place (you did upload the proper files right?) then all should show on the bottom of the page just fine.

A few things to look for.

1) Make sure you insert the code into the proper "tpl_main_page.php" file. If you are using a custom template then insert and make sure you upload to your custom directories "common" folder (don't upload to the default template folder or it won't work for you).

2) After you have the code in place make sure you insert your tracking number into the admin config of the module (found in the admin under configuration).

3) Choose the type of code you which to show (new GA.js version or legacy urchin.js version) and save (again from admin).

If all is done correctly then you should have the code in place. If the code cuts off the rest of the page (missing </body> tag etc...) then you likely have a typo in the code you pasted so check that.

That should do it.