Download the PHP package aleksa/laravel-visitors-statistics without Composer

On this page you can find all versions of the php package aleksa/laravel-visitors-statistics. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-visitors-statistics

Laravel Visitor Statistics

Packagist Packagist Packagist

Simple visitor tracker and statistics package for Laravel 5 that can be used for dashboard graphs. Includes controller and routes to fetch visitor statistics (all and unique visits) for a certain month or year. You can also get total number of visits per country.

Installation

1) Install package using composer:

2) Since the package automatically adds it's middleware to web group you will have to register service provider manually

3) Run migrations:

4) Publish configuration:

and choose Aleksa\LaravelVisitorsStatistics\Providers\VisitorStatisticsProvider from the list

5) Download MaxMind database

GeoIP

Since fetching data from external API (eg: ipstack, ipdata etc...) takes time and slows down your application and can also produce monthly costs the package uses local MaxMind database and maxmind-db/reader package for reading it's contents and locating the visitors.

For more sophisticated tracking you should use something like Google Analytics.

Configuration

Name Description Default
track_authenticated_users Should the tracker track authenticated users false
track_ajax_request Should the tracker track ajax requests false
login_route_path Admin login path so that login attempts don't track as visits 'admin'
prefix Prefix to apply to all statistics fetching routes 'admin'
middleware Middlewares to be applied to all statistics fetching routes '['web', 'auth']'
database_location Location where to store MaxMind database storage_path('app/maxmind.mmdb')
database_download_url MaxMind database download url MAXMIND_URL
auto_update Should laravel automatically update MaxMind database true

NOTE: If you set auto_update to true make sure to add Laravel cron entry that is needed for Task Scheduling.

Fetching statistics

The package comes with a controller and a bunch of routes to fetch statistics. The idea is to fetch statistics on your dashboard with AJAX request and parse data to some JavaScript graph library like Highcharts.

Route name Route URI Description
visitorstatistics.all_statistics /statistics/{year}/{month?} Get statistics for the given year or month.
visitorstatistics.unique_statistics /statistics/unique/{year}/{month?} Get unique statistics for the given year or month.
visitorstatistics.total_statistics /statistics/total/{year}/{month?} Get both all and unique statistics for a given year or month.
visitorstatistics.countries /statistics/countries Get visits count and percentage for each country.
visitorstatistics.available_dates /statistics/available/{year?} Get years or months that have statistics tracked.

NOTE: All routes are prefixed with value set in configuration and return response in JSON format.

Example responses

/admin/statistics/2019

/admin/statistics/2019/6

/admin/statistics/total/2019

/admin/statistics/countries

/admin/statistics/available

Information being collected

This is the data that is being tracked for each visitor.

Name Description
ip e.g. '127.0.0.1'
country e.g. 'Serbia'
city e.g. 'Belgrade'
device e.g. 'desktop'
browser e.g. 'Chrome'

License

This is open-sourced software licensed under the MIT license.


All versions of laravel-visitors-statistics with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1.3
ext-zlib Version *
illuminate/http Version ~7.0.0
illuminate/database Version ~7.0.0
illuminate/routing Version ~7.0.0
illuminate/support Version ~7.0.0
piwik/device-detector Version ^3.11
maxmind-db/reader Version ^1.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package aleksa/laravel-visitors-statistics contains the following files

Loading the files please wait ....