Download the PHP package netesy/tracker without Composer

On this page you can find all versions of the php package netesy/tracker. 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 tracker

Laravel Stats Tracker

Latest Stable Version

Tracker gathers a lot of information from your requests to identify and store:

Index

Why?

Storing user tracking information, on indexed and normalized database tables, wastes less disk space and ease the extract of valuable information about your application and business.

Usage

As soon as you install and enable it, Tracker will start storing all information you tell it to, then you can in your application use the Tracker Facade to access everything. Here are some of the methods and relationships available:

Current Session/Visitor

Most of those methods return an Eloquent model or collection, so you can use not only its attributes, but also relational data:

Sessions (visits)

Online Users

Brings all online sessions (logged and unlogged users)

Users

User Devices

Events

Errors

PageViews summary

PageViews By Country summary

Filter range

You can send timestamp ranges to those methods using the Minutes class:

Routes By Name

Having a route of

You can use this method to select all hits on that particular route and count them using Laravel:

And if you need count how many unique visitors accessed that route, you can do:

Screenshots

Visits

visits

Charts

charts

Users

users

Events

events

Errors

errors

Blade Views

The views above are available in this package, but you need to install the sb-admin panel on your public folder, please look at the instructions below.

How data is stored

All tables are prefixed by tracker_, and here's an extract of some of them, showing columns and contents:

sessions

devices

agents

languages

domains

errors

events

geoip

log

paths

route_paths

routes

sql_queries ;

Manually log things

If your application has special needs, you can manually log things like:

Events

Routes

Requirements

For Laravel 4+ please use version 2.0.10.

Installing

Require the tracker package by executing the following command in your command line:

composer require Netesy/tracker

Add the service provider to your app/config/app.php:

Add the alias to the facade on your app/config/app.php:

Publish tracker configuration:

Laravel 4

php artisan config:publish netesy/tracker

Laravel 5

php artisan vendor:publish --provider="Netesy\Tracker\Vendor\Laravel\ServiceProvider"

Enable the Middleware (Laravel 5)

Open the newly published config file found at app/config/tracker.php and enable use_middleware:

Add the Middleware to Laravel Kernel (Laravel 5)

Open the file app/Http/Kernel.php and add the following to your web middlewares:

Enable Tracker in your config.php (Laravel 4) or tracker.php (Laravel 5)

Publish the migration

php artisan tracker:tables

This is only needed if you are on Laravel 4, because vendor:publish does it for you in Laravel 5.

Create a database connection for it on your config/database.php

Migrate it

If you have set the default connection to tracker, you can

php artisan migrate

Otherwise you'll have to

php artisan migrate --database=tracker

If you are planning to store Geo IP information, also install the geoip package:

composer require "geoip/geoip":"~1.14"

or

composer require "geoip2/geoip2":"~2.0"

And make sure you don't have the PHP module installed. This is a Debian/Ubuntu example:

sudo apt-get purge php5-geoip

Everything Is Disabled By Default

Tracker has a lot of logging options, but you need to decide what you want to log. Starting by enabling this one:

It is responsible for logging page hits and sessions, basically the client IP address.

Multiple authentication drivers

You just have to all your auth IOC bidings to the array:

Stats Panel

To use the stats panel on your website you'll need to download the sb-admin 2 sources to your public folder:

git clone https://github.com/BlackrockDigital/startbootstrap-sb-admin-2.git public/templates/sb-admin-2
cd public/templates/sb-admin-2
git checkout tags/v3.3.7+1
git checkout -b v3.3.7+1

And enabled in your config file:

Set the web middleware for stats routes (Laravel 5)

Only admins can view the stats, so if you don't have an is_admin attribute on your user model, you'll have to add one:

It can be 'admin', 'is_admin', 'root' or 'is_root'.

Troubleshooting

Is everything enabled?

Make sure Tracker is enabled in the config file. Usually this is the source of most problems.

Tail your laravel.log file

Usually non-trackable IP addresses and other messages will appear in the log:

SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'field name'

This is probably related to SQL modes on MySQL, specifically with NO_ZERO_IN_DATE and NO_ZERO_DATE modes:

https://stackoverflow.com/questions/36882149/error-1067-42000-invalid-default-value-for-created-at

Because Laravel's defaults to

You may need to change your Tracker database connection configuration to

Not able to track users?

If you get an error like:

Base table or view not found: 1146 Table 'tracker.users' doesn't exist

You probably need to change:

'user_model' => 'Netesy\Tracker\Vendor\Laravel\Models\User',

To create (or use a current) a User model:

'user_model' => 'App\TrackerUser',

And configure the Connection related to your users table:

protected $connection = 'mysql';

Not able to track API's?

In your kernel

protected $middlewareGroups = [
    'web' => [
        .......
        \Netesy\Tracker\Vendor\Laravel\Middlewares\Tracker::class,
    ],

    'api' => [
       .......
        \Netesy\Tracker\Vendor\Laravel\Middlewares\Tracker::class,
    ],
];

Author

Antonio Carlos Ribeiro All Contributors

License

Tracker is licensed under the BSD 3-Clause License - see the LICENSE file for details

Contributing

Pull requests and issues are more than welcome.


All versions of tracker with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
doctrine/dbal Version ^2.6|^3.1
laravel/framework Version ~5|~6|~7|~8
netesy/support Version ~0.6|~0.7|~0.8|~0.9
ramsey/uuid Version ^3 || ^4
jenssegers/agent Version ~2.1
ua-parser/uap-php Version ~3.4
pragmarx/datatables Version ^1.4.12
snowplow/referer-parser Version ~0.1
jaybizzle/crawler-detect Version ~1.0
psr/log Version ~1.0
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 netesy/tracker contains the following files

Loading the files please wait ....