IntroductionI was having problems figuring out where to install the js installation code for StatCounter. I did a search here for any possible answers but I only found a couple of posts pertaining to StatCounter and they didn\\\'t answer the question of how to get it to work. So I figured I\\\'d check the StatCounter forum before I posted here.
Again... there was only a few posts from xoops users there and none of them really answered my questions, so I bumped an old thread to ask for clarification and with a hint from one of their members I figured out a solution that seems to work.
ProblemThe instructions for installing StatCounter was that you were to insert the code anywhere in your raw html document between the body tags. The problem lies that Xoops doesn\\\'t really have \\\"raw html.\\\" People have tried inserting it into the
\\\"themes.html\\\" but it neither shows up on the site (if you are choosing a visible counter) nor does it count hits to the site. So the problem was where could you insert a snippet of code simply that would integrate it into every page?
SolutionOriginal PostLog on to your Admin Panel then copy your StatCounter installation code and paste it here:
Sys Admin => Preferences => Meta Tags and FooterNow just add the code wherever you want in the \\\"Footer\\\" dialogue box at the bottom of the form.
I hadn\\\'t thought of it earlier cause as I said above, the instructions said to put it into the html, so I didn\\\'t even think of using the Footer preference.
As for the javascript, as long as your host allows javascript you should be able to use the js code. I thought there might be problems with it but it seems to be working just fine.
Another Method
I tried entering the StatCounter code in the footer but it still did not work, so in the end I edited the system_block_mainmenu.html template, inserting the code straight after .
Obviously this is more appropriate for the invisible counter, as it looks a bit strange sitting just below the main menu. To check if it is working, change to a visible counter and refresh your site. If you see the counter you know it is working and you can change it back to invisible.