This is a plugin for Craft CMS, currently version 1 and 2 only. It's a very basic visitor counter. It provides a dashboard widget and variables to display the statistics anywhere. Currently the widget is German only. I will look into translating it into English soon.
It simply counts unique IP addresses per day.
The data that is going to be stored is:
- access date
- a SHA256 hash containing the IP and the date
That's all for now.
Just add the widget to the dashboard like you add any other widget too.
Add the following variable anywhere inside your template:
{{ craft.visitorCounter.trackVisitor }}
Add the following variable to output the counter statistics:
{{ craft.visitorCounter.getVisitorData( <period> ) }}
The parameter period
can be one of the following strings:
today
: outputs the number of todays visitors (will be used, if no parameter is passed)yesterday
: outputs the number of yesterdays visitorsweek
: outputs the number of all visitors within the last seven daysall
: outputs the number of all visitors anytime
Example:
{{ craft.visitorCounter.getVisitorData('today') }}
- Added more Strings (hopefully all) to translation file
- Updated the plugin version this time
- Changed plugin folder name from "src" to "visitorcounter"
- Added English translation
- Initial release with simple Dashboard Widget and template variables