Post Reply 
 
Thread Rating:
  • 2 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
HitCount Plugin
Author Message
mvlcek Offline
Posting Freak

Posts: 1,987
Joined: Jan 2011
2011-02-18 08:14:00
HitCount Plugin

For all those who want an integrated hit and visitor count or don't trust Google Analytics & Co, here's a simple plugin to count hits per page: http://get-simple.info/extend/plugin/hitcount/91/

You can view and reset the hit counts in the admin console under Support - Hits & Visitors.

Installation

The plugin tries to create a directory /data/other/hitcount but depending on your hoster's setting this might be unsuccessful or just create a directory that can not be written to.

If the hit counts remain zero although you access the site:
  • create a directory hitcount in /data/other with mode 0777
  • if you use Apache, create a .htaccess file with "DENY FROM ALL" in this directory

Counting Downloads

Install the Download Interceptor plugin.
(requires Hitcount 1.0+)

Counting hits to other websites

Include a link on the other website to http://your-path-to-getsimple/plugins/hitcount/ping/ping.php?from=subject,
where subject is the name, under which you will see the hits one the Hits & Visits page.
You can return the same subject for the whole website or a different one for each page. Just make sure that the subject is different from all page slugs on your GetSimple site.
The above link returns a 1px transparent gif. If you add an additional parameter js or css, empty files of that type are returned.
(requires Hitcount 1.1+)

Blacklisting IP addresses

You can create a file /data/other/hitcount_blacklist.txt and enter the IP addresses to be blacklisted separated by blanks or line feeds. Hits from these IP addresses are not counted (if the IP address of the client is recognized).
(requires Hitcount 1.1+)

I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
(This post was last modified: 2013-01-06 02:44:42 by mvlcek.)
Visit this user's website Find all posts by this user Quote this message in a reply
ccagle8 Offline
Administrator

Posts: 1,848
Joined: Aug 2009
2011-02-18 11:11:56
HitCount Plugin

mvlcek wrote:...or don't trust Google Analytics & Co

who wouldn't trust these guys?!?!? Smile

- Chris
Thanks for using GetSimple! - Download

Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Visit this user's website Find all posts by this user Quote this message in a reply
RobA Offline
Senior Member

Posts: 289
Joined: Oct 2010
2011-02-19 06:25:44
HitCount Plugin

Any thoughts of extending it to full analytics?

i.e. entry/exit, visitor path, etc.

-Rob A>

Try the SimpleCache plugin!
Try the Client Files plugin!
Try the External Commenting plugin!
Find all posts by this user Quote this message in a reply
yojoe Offline
GS Freak

Posts: 1,203
Joined: Jun 2010
2011-02-19 20:07:52
HitCount Plugin

RobA wrote:Any thoughts of extending it to full analytics?

i.e. entry/exit, visitor path, etc.

-Rob A>
by entry you mean referrer ?
would be cool Smile

Addons: getsimple theme, Online Visitors, Notepad
Visit this user's website Find all posts by this user Quote this message in a reply
mvlcek Offline
Posting Freak

Posts: 1,987
Joined: Jan 2011
2011-02-19 23:25:59
HitCount Plugin

Version 0.7 writes a log file with time, page, visitor number, referer and user agent. No personal data and no IP adresses are logged by the plugin (important in Austria and Germany, as data privacy laws forbid logging of personal data and IP adresses are seen as personal data by some courts).

Currently the plugin allows you to view visit durations, referers and user agents along with total number of visits and hits per page.

I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Visit this user's website Find all posts by this user Quote this message in a reply
Ampersand Offline
Member

Posts: 59
Joined: Feb 2011
2011-02-20 02:18:55
HitCount Plugin

Any way to have these numbers on public pages? Ex. any functions to be included in a component?
Find all posts by this user Quote this message in a reply
mvlcek Offline
Posting Freak

Posts: 1,987
Joined: Jan 2011
2011-02-20 03:46:47
HitCount Plugin

Version 0.8:
  • Bars overlaying the numbers on the administration pages for a better overview
  • Functions return_hitcount_hits(return_page_slug()) and return_hitcount_visits() to display hits of the current page and visits on your site.

[Image: hitcount_hits.png]

I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
(This post was last modified: 2011-02-20 20:33:39 by nime.)
Visit this user's website Find all posts by this user Quote this message in a reply
mvlcek Offline
Posting Freak

Posts: 1,987
Joined: Jan 2011
2011-03-14 05:14:56
HitCount Plugin

Version 0.9:
  • Show operating systems (from user agent)
  • Show browsers (from user agent)
  • Show default language (from user agent) - to find out, into which languages you might want to translate your site using the I18N plugin ;-)

I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Visit this user's website Find all posts by this user Quote this message in a reply
yojoe Offline
GS Freak

Posts: 1,203
Joined: Jun 2010
2011-03-14 13:36:19
HitCount Plugin

Mvlek: your plugin development is faster than me taking shower Wink

Regarding latest version of your hitcount plugin, will you update browser tab to show specific versions of browsers as well ?
You could take it from user agent info, like:
Mozilla/5.0 (Windows; U; Windows NT 6.1Wink Gecko/20110303 Firefox/3.6.15 (.NET CLR 3.5.30729)
but still haven't had enough time to look into plugin core of v.0.9

btw. hitctount plugin lacks translation possibility.
How can I provide language files to your other plugins ?
You should also push menu caption to translation file.


ahhh, I'd forgot: think about adding a feature to disable hitcount from certain IP's/domains, because counting own visits raises statistics greatly Winks

Addons: getsimple theme, Online Visitors, Notepad
(This post was last modified: 2011-03-14 13:37:41 by BlackRose.)
Visit this user's website Find all posts by this user Quote this message in a reply
mvlcek Offline
Posting Freak

Posts: 1,987
Joined: Jan 2011
2011-03-14 17:21:56
HitCount Plugin

yojoe wrote:Regarding latest version of your hitcount plugin, will you update browser tab to show specific versions of browsers as well ?

I decided against it, because there are too many versions and the list would mostly have 1-visit entries.
Same reason for OS to have for OS X only the first 2 numbers in version.

Quote:You could take it from user agent info, like:
Mozilla/5.0 (Windows; U; Windows NT 6.1Wink Gecko/20110303 Firefox/3.6.15 (.NET CLR 3.5.30729)

The version information is parsed, but not included in the output. Maybe I'll include a "Show versions" switch? Meanwhile you can patch hitcount/browser.php and set $ua['name'] to browser[0].' '.browser[1] (if I remember correctly).

Quote:btw. hitctount plugin lacks translation possibility.

Yep, on my TODO - as the header of hitcount.php reminds me...

Quote:How can I provide language files to your other plugins?

Look into the <pluginname>/lang directory and create a similar file.

Quote:You should also push menu caption to translation file.

I do not understand?

Quote:ahhh, I'd forgot: think about adding a feature to disable hitcount from certain IP's/domains, because counting own visits raises statistics greatly Winks

Does not work for me - changing IPs. And you should see all visits, even from your IP (company), as long as it's not the editor/administrator.

How about setting a cookie in the backend - thus all editors are automatically excluded - as long as they don't delete the cookie.
But I fear there is no appropriate hook - like index-pretemplate for the frontend - for the backend?

I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Visit this user's website Find all posts by this user Quote this message in a reply
yojoe Offline
GS Freak

Posts: 1,203
Joined: Jun 2010
2011-03-15 03:59:51
HitCount Plugin

Quote:I decided against it, because there are too many versions and the list would mostly have 1-visit entries.
Same reason for OS to have for OS X only the first 2 numbers in version.

Hmm... How about cutting versions and show main branches, for example
FX < 3.6, FX.3.6 (latest version number cut off), FX .4
Chrome < 9, 9 > 9
and so on ?
The most important for me is still Internet Exploiter :/

Quote:
Quote:How can I provide language files to your other plugins?

Look into the <pluginname>/lang directory and create a similar file.
ahh, I had on my mind where to send them, because I didn't find an email nor a contact form on your website Wink
I'll just post a zip with translation to all plugins after I patch all of them to latest version, and retranslate them, because you split i18n to 2 plugins (nice!).

Quote:
Quote:You should also push menu caption to translation file.

I do not understand?
example: hitcound plugin has hardcoded menu caption "Hits & Visitors", as well as your other plugins.
I wanted to ask to have a possibility to translate menu caption in GS admin using language file.
Of course if you already do not have this on your todo list Wink

Quote:Does not work for me - changing IPs. And you should see all visits, even from your IP (company), as long as it's not the editor/administrator.

Quote:How about setting a cookie in the backend - thus all editors are automatically excluded - as long as they don't delete the cookie.
But I fear there is no appropriate hook - like index-pretemplate for the frontend - for the backend?

Cookie isn't a great idea, as it will work only for 1 browser on 1 terminal.
How about grabbing visitor's IP, having a black list where we could paste our external IP number(s), and a button to parse all statistic files and delete numbers of all visits coming from blacklisted IPs ?
But it's not an elegant way, and takes more resources comparing to a solution based on comparation between visitor's IP and blacklisted IP number.

Addons: getsimple theme, Online Visitors, Notepad
Visit this user's website Find all posts by this user Quote this message in a reply
yojoe Offline
GS Freak

Posts: 1,203
Joined: Jun 2010
2011-03-16 01:54:43
HitCount Plugin

Got a small requests:
1. moving hitcount window to pages page instead of support page
2. instead of hiding button of currently seen statistics, just make it unclickable.

It's easy, but you update your plugins too frequently with awesome functionalities, so it doesn't make any sense to mess with their code all the time I want to update a plugin :/

Addons: getsimple theme, Online Visitors, Notepad
Visit this user's website Find all posts by this user Quote this message in a reply
mvlcek Offline
Posting Freak

Posts: 1,987
Joined: Jan 2011
2011-03-22 06:46:43
HitCount Plugin

New version 0.9.1: Just fixes a warning in debug mode on GetSimple 3.0b.

I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Visit this user's website Find all posts by this user Quote this message in a reply
mvlcek Offline
Posting Freak

Posts: 1,987
Joined: Jan 2011
2011-03-22 07:11:02
HitCount Plugin

yojoe wrote:Hmm... How about cutting versions and show main branches, for example
FX < 3.6, FX.3.6 (latest version number cut off), FX .4
Chrome < 9, 9 > 9
and so on ?

Firefox 2 numbers (e.g. 3.5, 3.6), Chrome 1 number, ... is doable. And maybe a toggle - with/without versions.

yojoe wrote:because you split i18n to 2 plugins (nice!).

In order to make a I18N Navigation plugin, but also because you can only have one admin view per plugin - and I needed a second for the navigation structure.

yojoe wrote:example: hitcound plugin has hardcoded menu caption "Hits & Visitors", as well as your other plugins.
I wanted to ask to have a possibility to translate menu caption in GS admin using language file.

Already done for I18N and I18N Search.

yojoe wrote:Cookie isn't a great idea, as it will work only for 1 browser on 1 terminal.
How about grabbing visitor's IP, having a black list where we could paste our external IP number(s), and a button to parse all statistic files and delete numbers of all visits coming from blacklisted IPs ?
But it's not an elegant way, and takes more resources comparing to a solution based on comparation between visitor's IP and blacklisted IP number.

If the plugin uses a blacklist, it has to be checked on first hit of a visitor, as the plugin does not and will not log ip addresses (in Germany and Austria IP addresses are personal data (probably, depends on the court) and must not be logged without the consent of the visitor).

yojoe wrote:Got a small requests:
1. moving hitcount window to pages page instead of support page

I think it belongs to support, the editor using the pages menu doesn't normally need it.
But you can just change 'support' to 'pages' in the register_plugin call.

yojoe wrote:2. instead of hiding button of currently seen statistics, just make it unclickable.

Are you sure? Currently the links only use a second line with "Operating Systems". After this change they always would.

I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Visit this user's website Find all posts by this user Quote this message in a reply
yojoe Offline
GS Freak

Posts: 1,203
Joined: Jun 2010
2011-03-22 07:52:37
HitCount Plugin

mvlcek wrote:Firefox 2 numbers (e.g. 3.5, 3.6), Chrome 1 number, ... is doable. And maybe a toggle - with/without versions.

Assuming it can't be done for all types of browsers, then it makes no sense in wasting time on coding such functionality only for 1-2 browsers.

Code:
If the plugin uses a blacklist, it has to be checked on first hit of a visitor, as the plugin does not and will not log ip addresses (in Germany and Austria IP addresses are personal data (probably, depends on the court) and must not be logged without the consent of the visitor).

Going this route, using any analytic application in Germany is prohibited.
I'm not here to talk about law matters, just wanted to point out that many hits are coming from user(s) managing their own website.

Code:
I think it belongs to support, the editor using the pages menu doesn't normally need it.
But you can just change 'support' to 'pages' in the register_plugin call.
Been doing that already Wink

mvlcek wrote:
yojoe wrote:2. instead of hiding button of currently seen statistics, just make it unclickable.
Are you sure? Currently the links only use a second line with "Operating Systems". After this change they always would.
Hmm...I got a feeling you don't get what I'm talking about.
When (at least in hc v 9.6) I jump between: Hits | Referers | User agents | Duration | Browsers | Languages, the stat I'm currently looking has its button hidden.
This makes me confused as the navigation menu changes its size, and distracts me. It leads me to forget what stats I've already seen.
I know that there's a caption on top left corner, but looking at it from usability view, it's better to have a coloured and disabled menu button of the page I'm already on.

Just mine 2 cents.

Addons: getsimple theme, Online Visitors, Notepad
Visit this user's website Find all posts by this user Quote this message in a reply
mvlcek Offline
Posting Freak

Posts: 1,987
Joined: Jan 2011
2011-03-22 08:09:00
HitCount Plugin

yojoe wrote:Going this route, using any analytic application in Germany is prohibited.

Google analytics introduced a function to anonymize the ip addresses before they log them, mainly for Germany, I think.

yojoe wrote:I'm not here to talk about law matters, just wanted to point out that many hits are coming from user(s) managing their own website.

I know, it shouldn't be too hard to implement a black list. I write it on my to do list.

yojoe wrote:Hmm...I got a feeling you don't get what I'm talking about.

I do understand, but the list of links is already long and wraps into the second line sometimes. If the current link is shown, it will always wrap into the second line.
But you are right, hiding the current link is a bit confusing - I'll change it.

I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Visit this user's website Find all posts by this user Quote this message in a reply
dey Offline
Junior Member

Posts: 29
Joined: Jul 2011
2011-07-27 23:49:13
HitCount Plugin

mvlcek wrote:thus all editors are automatically excluded
Hi,

this feature I would appreciate as well.
- could be loggen in user or
- blacklist or
- at least hits coming from admin panel

bydey
deynews.de

my getsimple page deynews.de
Visit this user's website Find all posts by this user Quote this message in a reply
lulo Offline
Junior Member

Posts: 6
Joined: Jul 2010
2011-07-28 09:25:06
HitCount Plugin

Works fine


Regards!
Find all posts by this user Quote this message in a reply
patriotmedia Offline
Junior Member

Posts: 45
Joined: Feb 2011
2011-08-09 06:12:49
HitCount Plugin

Awesome plugin! A suggestion would be to add back the <h3> after the <label> tab on each plugin page. Your screenshots show it, but upon installation they weren't there. Makes it blend in a little better with the default admin template...
Visit this user's website Find all posts by this user Quote this message in a reply
mikeh Offline
Senior Member

Posts: 661
Joined: Feb 2011
2011-08-09 06:24:37
HitCount Plugin

patriotmedia wrote:Awesome plugin! A suggestion would be to add back the <h3> after the <label> tab on each plugin page. Your screenshots show it, but upon installation they weren't there. Makes it blend in a little better with the default admin template...

Thanks for the great plugin. I use it for dozens of clients. One great feature would be the ability to use track statistics on 3rd party pages. Could this be easily accomplished?

Multi User
Front End User Login
GS Blog v.0
All my plugins
Visit this user's website Find all posts by this user Quote this message in a reply
mvlcek Offline
Posting Freak

Posts: 1,987
Joined: Jan 2011
2011-08-10 01:03:44
HitCount Plugin

mikeh wrote:Thanks for the great plugin. I use it for dozens of clients. One great feature would be the ability to use track statistics on 3rd party pages. Could this be easily accomplished?

I'm glad that the plugin is useful :-)

What do you mean with 3rd party pages? How often the referer was another domain?

I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Visit this user's website Find all posts by this user Quote this message in a reply
mikeh Offline
Senior Member

Posts: 661
Joined: Feb 2011
2011-08-10 04:52:50
HitCount Plugin

mvlcek wrote:
mikeh wrote:Thanks for the great plugin. I use it for dozens of clients. One great feature would be the ability to use track statistics on 3rd party pages. Could this be easily accomplished?

I'm glad that the plugin is useful :-)

What do you mean with 3rd party pages? How often the referer was another domain?

For example, services like Statcounter or give you code you can put on any webpage to track the stats on it. It doesn't necessarily need to be from the same domain/domain-level.

I integrate many of my websites with third party services (such as IDX Broker.com) (Site ex: http://search.agentboca.com/idx/8526/adv...arch.php). This plugin only tracks local pageviews, so I cannot track traffic on search.agentboca.com. It would be great if there was a piece of js or something I can put in the footer of the third party service or outside domain webpage to track traffic on that page as well.

I am definitely not asking you to make some huge addition to your plugin to help out very few people who would need something similar. I am just curious if this is possible and if so, how easy it would be to accomplish.

Multi User
Front End User Login
GS Blog v.0
All my plugins
Visit this user's website Find all posts by this user Quote this message in a reply
blazejs Offline
Junior Member

Posts: 44
Joined: Apr 2011
2011-09-12 23:01:10
HitCount Plugin

Hello

I have noticed in Hitcount's statistics a lot of 404 hits. What can it means? Should I worry about that?

Artscape - projektowanie stron www
Visit this user's website Find all posts by this user Quote this message in a reply
mvlcek Offline
Posting Freak

Posts: 1,987
Joined: Jan 2011
2011-09-13 00:25:10
HitCount Plugin

blazejs wrote:Hello

I have noticed in Hitcount's statistics a lot of 404 hits. What can it means? Should I worry about that?

It could mean that somewhere (on your site or somewhere else) there are links to pages on your site that don't exist anymore.

I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Visit this user's website Find all posts by this user Quote this message in a reply
blazejs Offline
Junior Member

Posts: 44
Joined: Apr 2011
2011-09-13 01:13:09
HitCount Plugin

Hmm.. that's strange as I have redirected (301) all previous pages to new and I also use LinkJuice on some sites.

I have just checked it out and it seems problem doesn't exist where LinkJuice is installed, so I have to upload it to every site. Thanx!

Artscape - projektowanie stron www
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)

Contact Us | GetSimple | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication
Generate Leads from Documents vCard Hosting