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:
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+)
Get visitors' countries
You can download a mapping from IP to country and thus determine the countries of your visitors.
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+)
Get visitors' countries
You can download a mapping from IP to country and thus determine the countries of your visitors.
- Register at https://www.ip2location.com and get a token for downloads.
- Enter into gsconfig.php (replace MY_TOKEN with the real token):
Code:
define('HITCOUNT_URL', 'https://www.ip2location.com/download/?token=MY_TOKEN&file=DB1LITEIPV6');
- go to Support - Hits & Visitors and select Download IP to country database. This will create the files /data/other/ip2country.txt and /data/other/countries.txt.
- From then on the plugin tries to determine the visitors' countries.