Forum:Stats Counter Implementation

Hello, I'd like to implement a stats counter on my wiki, I saw on Runescape wiki that they implemented it in the sidebar. I can do that copying their code, but I'd like also to implement the counter, which is an html/js script code, in the home page (simply add the code doesn't work) otherwise it will be ignored in the stats. So i need a simple javascript code which add the code to the page, or even better add the code in a certain position (indicated, for example by an element with a certain class like div class="counter"). Alternately a script which will add the code to the header or the footer (like those clocks scripts).


 * You need to get the code from Quantcast and use that. You can move it around with CSS once it works.

I'm using Histats, what is Quantcast? Also, I forgot to mention that it's suggested to put the code in tags, (in the body of the page) so if I add the body tags to the code will cause problems? Or I don't even have to do that?

Hi, I think I understand what you're asking. To put the counter on the homepage, add your HTML and JS code to a new page in the MediaWiki namespace: the name doesn't matter, maybe try MediaWiki:Counter. Then, at the bottom of your homepage, put Counter. I think you could put that anywhere on the page, although I'm not sure how you would put that in a certain position: I assume you could add the CSS to MediaWiki:Counter and it would stylize it. Cook Me Plox 20:22, August 5, 2011 (UTC)