Visitor tracking and analytics for Laravel apps.
bad-mushroom/laravel-tourist is a Laravel package for visitor tracking and analytics for laravel apps..
It currently has 0 GitHub stars and 64 downloads on Packagist (latest version v0.1.0).
Install it with composer require bad-mushroom/laravel-tourist.
Discover more Laravel packages by bad-mushroom
or browse all Laravel packages to compare alternatives.
Last updated
A simple package for tracking unique visits, utm parameters, and model views.
composer require bad-mushroom/laravel-tourist
php artisan migrate
The migration will create two new tables:
tour_sessions
tour_visits
In App\Http\Kernel,
'web' => ]
...
\BadMushroom\Tourist\Middleware\Tourism::class,
];
or apply the middleware to a specifc route:
Route::get('/', function () {
return view('welcome');
})->middleware('tourism');
Run php artisan vendor:publish to publish the config/tourist.php config file where you can modify some settings.
Adding the BadMushroom\LaravelTourist\Tourable trait to your models will will allow you to use the visits relationship.
Tour::visit($model)
Running php artisan tourist::clear will remove all expired tourist sessions and visits. YOu can canfigure how many days to keep data in the config file.