About the Project
Simple plugin to count and show a total number hits (Unique visitors or page-views) to the site without using any third party code.
As the name suggests, it’s a very simple Hit Counter that counts the number of Unique Visitors and Page-views. You can show either the Unique Visitors or total page-views count anywhere on the site using widgets or shortcode. You can also add/show both Counters by using two copies of the widget or the shortcode. It keeps counting even when you have no widget or shortcode active. To completely disable the counter you have to disable the plugin.
Features
- AJAX based counter ignores most bots or crawlers
- Monthly and weekly graph
- Show either the Unique Visitors or Page-views count
- Ability to reset the counter to any number
- Can be show anywhere on the site using Widgets and Shortcode
Shortcodes
- Unique Visitors = srs_total_visitors
- Page Views = srs_total_pageViews
Installation
From your WordPress dashboard
1. Visit ‘Plugins > Add New’
2. Search for ‘SRS Simple Hits Counter’
3. Activate ‘SRS Simple Hits Counter’ from your Plugins page.
4. Use widget to display the counter in footer or sidebar etc.
5. Use the shortcode to add the counter to any part of the site.
From WordPress.org
1. Download ‘SRS Simple Hits Counter’.
2. Upload the ‘SRS Simple Hits Counter’ directory to your ‘/wp-content/plugins/’ directory, using your favorite method (ftp, sftp, scp, etc…)
3. Activate ‘SRS Simple Hits Counter’ from your Plugins page.
4. Use widget to display the counter in footer or sidebar etc.
5. Use the shortcode to add the counter to any part of the site.
Demo
Unique Visitors
[srs_total_visitors]
Page-views
[srs_total_pageViews]
I get the following errors when using the plugin:
Warning: session_start(): Cannot send session cookie – headers already sent by (output started at /media/sf_sandbox/wordpress/wp-includes/class.wp-scripts.php:180) in /media/sf_sandbox/wordpress/wp-content/plugins/srs-simple-hits-counter/SRS_Simple_Hits_Counter.php on line 18
Warning: session_start(): Cannot send session cache limiter – headers already sent (output started at /media/sf_sandbox/wordpress/wp-includes/class.wp-scripts.php:180) in /media/sf_sandbox/wordpress/wp-content/plugins/srs-simple-hits-counter/SRS_Simple_Hits_Counter.php on line 18
Thanks – Dennis
Sorry for not responding to this earlier. There was an extra closing tag > bleeding out for page-views short code. Its fixed now.
Let me know if you still see the issue.
Shortcode is not working …but with []
Sorry, I don’t understand your question, please add some detail. Thanks
Shortcode is not working with this code ‘srs_total_visitors’
it is working so: [srs_total_visitors]
Thanks for that. I have updated instructions so people dont get confused.
Is there possible to change the plugin, that can be shown also visitors per day?
Do you want to show the count for the current day or did you want to see statistics like how many daily visitors or hits you get.
There is good plugin available if you want to see your site’s analytics.
https://wordpress.org/plugins/wp-slimstat/
Thank you for your answers…
I want show the count for the current days. Until now there are only the counts of total vistors to see. A special statistic is not neccessary.
Is it possible to change the color of the number of views? It’s kind of dark on my page. http://www.theoddspoon.com
Its your theme setting the font color or the counter text. You can update your theme css to change the color.
Try this css if your theme allows custom css.
.widget_srs_shc_widget span.visitors { color: white; }
Perfect. Thanks.
Is it possible to reset the counter back to zero when using only the shortcode in a message?
Never mind. I have the shortcode in a message. I go to widgets, drop the counter in a widget, reset it there and remove the widget again. Problem solved.
Thank you for this great plugin! works like a charm, and easy and simple!
Can you explain how a unique visitor is counted? Is it by IP address or a cookie or something else? Further, will the counter increment by one if the same person visits again the following day or within an hour etc. Thanks for great simple counter.
Unique visitors are counted by user sessions. As soon as the browser (not the tab) closes, session ends. So if a user comes back after restarting the browser even within a minute, it is counted as new unique visit.
Hi, useful script. But how could I modify it to group thousands via a comma (e.g. 12345 becomes 12,345)
Please update your plugin. This feature is added today the the latest version 0.1.6 today.
Anyone?
At the moment you can’t add a comma. I’ll try and add this feature in future updates.
Please download the latest version. This feature has been added today.
Is it possible to have the counter alongside the heading like this:
Unique visits: 10
rather than
Unique visits:
10
If so, how could I change it to do this?
Thanks
You can do it with CSS or you can use shortcodes
Hey Sandy! I would like to know If it is possible to change the language, for example: “Unique Visitors” for “Visitantes”. Thank u 🙂
You can change the title of the widget
It seems as after the latest couple of updates the plugin stopped working. I know it’s now filtering out bots and crawlers, but we show no record of a single page view or visitor since the update and I know people have been to the site. I’ve also tried viewing on my phone and it has not recorded that hit either.
Hello Toni, are you running a multisite
No, not multisite. I tried deactivating it, that didn’t work. The I uninstalled and reinstalled and activate, nothing. It’s just no longer recording hits. I don’t know if it only records a hit one time or daily, or how it actually works. I know we have visitors to the site though because we use Google analytics and show visitors even through today.
I have released an update. That should fix the problem. Let me know if it works.
I just updated the plugin to version 1.0.2, deactivated it, reactivated it and reset the counter and it’s still not registering hits. After I reset the counter, I browsed to the site using 3 different computers and it didn’t register any of them as a hit.
Can you get me access to your site to see what’s going on.
Yes, how do you want me to send it to you? Do you have an email address or way to send a PM?
mysandyrig@gmail.com
Just sent an email with access to admin. Thank you very much.
Hello, after last update (version: 1.0.1) I can see error like this:
Parse error: syntax error, unexpected ‘[‘ in /www/z/b/u77313/public_html/wp-content/plugins/srs-simple-hits-counter/SRS_Simple_Hits_Counter.php on line 135
What is incorrect on line 135?
Are you running a multisite ?
No.
Ok, please create a ticket here with your wordpress version, site url and if possible screenshot of the error.
https://wordpress.org/support/plugin/srs-simple-hits-counter
Have you tried reactivating the plugin ?
I could not login to site because of error in counter. I had to rewrite single php file with old version from backup via ftp. After this I could deactivate the plugin at last.
Sorry about your ordeal.
Could you please share all the info on WordPress support forum. We need to figure out and fix this issue.
I have this version installed on my own sites that are working fine getting thousands of hits a day.
What just happened? I updated to the latest version, and now SRS Simple Hits Counter has disappeared from my tools menu, and the cumulative hits have been erased and reset to zero, and it is not counting any new hits – Help!
Sorry for inconvenience, we are aware of the issue and are going to fix it in next release in coming few days. Yes reactivating the plugin fixes the issue.
Hi, thanks for this great plugin ! It is exactly what I wanted. I didn’t want something with too many configuration to make. I tried so many other plugins before finding yours.
I just added some code so that the users logged in won’t be counted in views because I’m the only user (admin) on my website. This way, my views won’t be counted when I check the site from my computer or phone. This is a very easy piece of code to implement but I didn’t bother to add a checkbox to the admin page. I’m sure you will add it in a next release. I also added a piece of code to exclude an ip adress. It might be a good idea to add this functionnality aswell in a future release. It’s pretty easy to add and it is very usefull.
Thanks again so much for your work! Really enjoy this pluggin.
Tim
Hey, read this comment when you posted, but been busy. I’ll get back to you on this soon. Thanks!
Is there anyway to have this info available in the backend only?
Yes, just enable the plugin and see counts on plugin’s admin dashboad.
But if don’t have it on screen and just access the dashboard hat exactly do unique visitors and pages views numbers mean?… Number of views of home page only or all pages? Thank you.
All pages
Hi, does the counter show on the actual website or just within the builder?
It shows on the site, use the short code or the widget.
https://wordpress.org/plugins/srs-simple-hits-counter/
I’ve tried both ways. Still doesn’t show on actual site. May be user error. I’ll try again later. Thanks
Hello! I’d like to show total view count of all posts and pages on the front page of my WordPress blog. Does it work this way? Do I have to insert code manually at every post and page?
Hello, wondering if this has the ability to show unique page views, but, change the label to a name I want to use?
hello, i made 3 posts and refreshed each at different times to see how it counts and nomatter what i do the total views stays the same accross all 3 posts. inshort it displays the same views for each of the 3 posts. is this how it is supposed to work or am i experincing some kind of an error?
It doesn’t count views for individual posts. There is only one counter for all page/post views.