WordPress - StatCounter Plugin April 17, 2006
Posted by Lucanos in : programming, php, wordpress , trackbackI developed this (my first WordPress plugin) based extensively on the works of Ronald Heft, Jr. and his terrific WordPress Plugin “Google Analyticator“.
I learnt a fair bit whilst adapting his plugin to the StatCounter tracking system, and I am sure that any further developments on my part will surely incorporate some of teh terrific ideas used by Ronald in his plugin. No point re-inventing the wheel, after all…
Instructions:
- Click HERE for a zipped version of the file.
- Unzip this file and upload the enclosed PHP file into your “wp-content/plugins” folder.
- Go to your Plugin screen in your WordPress admin console.
- Fill out the details, as per the instructions.
- Switch the plugin over to Enabled.
- Watch your StatCounter counters start ticking over.
- Enjoy!
Any suggestions, feedback, ideas, complaints, virgin offerings are more than welcome.
Comments»
Nice work. A perfect adaptation of my code to meet another stat service’s requirements. While I won’t use it, I hope others will find your new plugin useful.
// Lucanos:
[…] The final task was to create a styling for the programming language code and the shell commands: the first of these tasks was made simpler by the excellent plugin called iG:Syntax Hiliter and I had to add a new style manually to make shell commands standout. Installation of StatCounter and Google Analytics code was made simpler by the plugins created for the same purpose. I am yet to decide whether or not I need the WP-Cache plugin and also something to manage the uploaded images and other such files. Filed under: General — tabrez @ 6:45 am | [Digg this] [del.icio.us] […]
I’m having one issue with the plugin - even after filling in the correct IDs, when I choose “Stat Counter Logging is: ENABLED” from the drop-down box and I press update, it continues to say that the plugin is “DISABLED.” I know I’ve filled the IDs out correctly (yes, even removing the quotes from the security variable). Any ideas what might be up?
// Lucanos:
having the same difficulty as hunter.
i added the statcounter code into the footer.php, it works with no problems but if i switch themes i have to do this each time. hoping your plugin will take care of this for me.
thanks in advance for any help!
// Laine:
finally! my site is w3c compliant! and the statscounter still works! Nice work Lucanos >>claps hand
// Lucanos:
Amazing plugin! I spent a whole afternoon trying to make the origional statcounter code w3c compliant, but, after descovering it was impossible, I had to give up. This plugin is the best wordpress statcouter plugin ive ever seen!
On some themes your plugin puts in the statcounter code twice, causing double logging. One example of such theme is Hemmed, which you can see on my site. The problem, I believe, rises when you have php embedded into another, like the livesearch.php page of Hemmed. This is going to be quite common as live search options are getting more common.
Any chance you could fix it?
Thanks.
\\ Lucanos:
okay, this will be stupid…
how do i make the counter show up?
i did everything it said on the options page of the plugin and it worked well.
but on my site i’m not seeing a counter anywhere.
don’t you usually need to assign it to the sidebar, footer or wherever you want it?
where’s the code for that?
i’m kinda confused, as you can see.
and to think that this is one of the more noob-friendly plugins …
// Lucanos:
I’m a little confused
after I enabled the plugin should i also add the js code to my page or not?
// Lucanos:
Is there a way to view stats from within my site, versus going to StatCounter’s site? That’s what I was really hoping for. Also, any plans on making something similar for Performancing?
Great job on this plugin, BTW. Although, I was confused about what it did until I checked Ronald Heft’s page for the Google Analyticator and read his description, so maybe you should put a description on this page as well?
// Lucanos:
Perfect Thanks,
I was using statcounter’s code on my website but sure this as a plugin is much better.
Best regards
Shakeb
I will have a go at it and report back in a while with my findings!
Love this whole ‘WordPress plugin’ thing!…Pretty fly!
Few question;
Where does the JS show up on the page? Is it at the bottom/below the footer. Will the spiders be able to view code and backlink to statcounter with this plugin? Also, how does this make it more WC3 compliant.
Thanks for the great plugin,
Ryan
// Lucanos:
thanks! you rule!
This is great. I’m sick of having to remember to add the code to my header everytime I change/upgrade my theme. I updated the other day and was wondering why I had no visitors for 2 days. This plugin would have fixed that.
Works great. Good job!!
[…] La pagina del progetto del plugin è questa per maggiori informazioni: http://blog.lucanos.com/2006/04/17/wordpress-statcounter-plugin/ […]
Luke… I found your Plugin very easy and comfortable. So I decided to translate it in my language (Italian) and to write a post with your plugin localized in Italian!
I linked your blog in the post… here you can view:
http://maxgallina.it/?p=67
If there is any problem (copyright or similar for example )I’ll delete my post as soon as possible.
Regards
Max
Statcounter Plugin For Wordpress…
One of the great things about Wordpress is the wide variety of themes that are available for it. However, often when I change my theme, I forget to change the Statcounter code that I had to manually put into the footer.php file of my original theme. Th…
I love this plugin. The documentation was great, and I had no problems configuring it.
First of all, thank you for this great piece of code! Said that, I’m here asking you if there’ll be any possibilities to get a translation of this pluging for http://pmetrics.performancing.com/ stats service. Indeed, I only need something to avoid admin accesses counts.
In any case, thank you.
I am using Wordpress 2.0.2 (I know need to upgrade) install and it works fine. Statcounter is a great plugin. Thanks for you effort in coding it.
Well so far it seems to work Thanks.
wow, that was seamless… thanks for the heads up on a great counter. It is a great asset. Any plans to have a page integrated into Wordpress so as to be able to see stats from there (in the admin section)?
// Lucanos:
Awesome plugin, installation instructions were clear on this page and after I installed the plugin.
Thanks you for coding it!
This is a great plugin. This type of is priceless for the new kid on the block.
Thanks
Vic
Thanks, it took only a few minutes to set it up, Great plugin! no problems. Great work!
The plugin is great! I love it! One of the reasons I changed to .org is to have decent stats and your help was great there
Hi, I can’t download the file. It says I don’t have the right program. Can you help?
// Lucanos:
hi,
this is a great plugin - thankyou!
I am also just wondering is there any way of making the statcounter code to appear lower in the page code rather than in the head portion of the code, for example just before the tag instead so as to keep the content highest up in the page code. This is where I would manually install it.
Thanks again,
thank you. this is a great plugins.
thanks, i had some problems with statcounter until i found this plugin,
i just made a link to statistic if anyone other than me is intrested in seein the pageloads. G