Download the PHP package coderius/yii2-hit-counter without Composer
On this page you can find all versions of the php package coderius/yii2-hit-counter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download coderius/yii2-hit-counter
More information about coderius/yii2-hit-counter
Files in coderius/yii2-hit-counter
Informations about the package yii2-hit-counter
Yii2 hit counter extention
About extention
This extension allows you to organize the collection of data about website visitors. Data is stored in a database.
What visitor data is collected
Javascript and php are used to get information about visitors:
By Javascript:
- Detect if client cookie enabled
- Detect if java enabled
- Detect if client has totuch device
- Timezone offset
- Type connection (like 4g etc.)
- Current url
- Referer url
- Client screen width
- Client screen height
- Client color depth
- Client browser language
- Client history length
- Client processor ram
By php:
- Visitor ip address
- Visitor user agent
- Visitor referer url
- Server name
- Auth user id
- Port
- Cookies http
- Os
- Client info
- Client device type (desctop etc.)
- Device brand
- Client device model (if detect)
- Detect is bot
- Host by ip
- Is proxy or vpn
- Date and time visit
Installation
The preferred way to install this extension is through composer.
First download module . Run the command in the terminal:
or add in composer.json
and run composer update
Run migrations in root folder project:
Usage
Include module in app config file. In advanced template go to common/main.php
and set to config array next params:
In view file past hit counter widget:
Testing
For tests neded test database and tables. Documentation about creating test db is at tests/_app/README.md.
In order to run the tests you need to do the following:
-
Set alias in terminal to phpunit:
- Go to root folder module 'yii2-hit-counter' in terminal and run tests:
All versions of yii2-hit-counter with dependencies
yiisoft/yii2 Version ^2.0
piwik/device-detector Version ~3.12
mockery/mockery Version ^1.2