SmartFAQ is developed by The SmartFactory (https://www.smartfactory.ca), a division of InBox Solutions (https://www.inboxsolutions.net)

Where do I insert the StatCounter installation code on my Xoops site?
Introduction

I 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.

Problem

The 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?

Solution

Original Post

Log on to your Admin Panel then copy your StatCounter installation code and paste it here:

Sys Admin => Preferences => Meta Tags and Footer

Now 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.


The comments are owned by the author. We aren't responsible for their content.
user

 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.

 
user

 Re: Another Method


I added it to theme.html and it works fine.

 
user

 Statcounter in a XOOPS website


I did the same. Simply insert the javascript code given by statcouter in theme.html just before the tag. I works great !

 
user

 Re: Statcounter in a XOOPS website


I wish I'd read this first. At first I tried inserting into the footer but the pages wouln't load so I guess I put it in a sensitive spot.

Then I put it in the theme.html right before the tag just like they said above and it works fine. And if you use the invisible counter, you'd never know it was there.

 
user

 odd...


placing it in the code didn't work for me at all... but I used the method above and its working just fine for me.

 
user

 Thank You!


Great advice -I had struggled to dothis; almost gave up, but thanks to you all I now have Statcounter and Google Analytics working!

 
user

 Re: Thank You!


I just edited footer.php and stuck it right at the end with a

tag. Works great! Shows right a the bottom center of each page.

 
user

 Theme vs Footer


Tip: Adding Statcounter code to the Footer may be preferable to the Theme...

When I placed it just before the of the theme.html Statcounter showed the number of pages hit & time etc. but NOT the specific Web page nor the referring link.

With Statcounter at the end of footer.php the stats look a whole lot better

 


Login

Who's Online

287 user(s) are online (7 user(s) are browsing XOOPS FAQ)


Members: 0


Guests: 287


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Did you know ?

that some images on Firefox doesn't appear just because of the default settings of this browser?

Random question

How can I know how many times a file has been downloaded?