Analyze Website plugin screenshot
Dark mode ready
Multilingual support
Supports v5.x

Analyze Website

Community

This package provides a Filament plugin for Laravel that tracks website analytics, including visitor activity, page views, and performance insights.

Tags: Analytics Panels Widget
Supported versions:
5.x 4.x
Third-party plugin. This is built by the community, not the Filament team. Filament does not review, endorse, or vet the security of plugins outside the filament/ namespace. Review the source and install at your own risk. Found malware or an unresolved security issue the author won't address? Report it .
mina avatar Author: mina

Documentation

#Quick Summary

This package helps in tracking and analyzing website visits. It records information about each visit, such as the visited page, visitor information, and the browser used.

#Installation

You can install the package via composer:

composer require minabeter/analyze-website
run php artisan migrate

Publish the config file with:

php artisan vendor:publish --tag=analyze-website-config

This will create a config/analyze-website.php file in your project.

#Usage

To set up the package correctly, please follow these steps:

  1. Add Service Provider: In your bootstrap/providers.php file, add the following line after AppServiceProvider::class:

    Mina\AnalyzeWebsite\AnalyzeWebsiteServiceProvider::class,
    
  2. Add Middleware: In your bootstrap/app.php file, within the web middleware group, add TrackVisit::class:

    ->withMiddleware(function (Middleware $middleware): void {
        $middleware->web(append: [
            \Mina\AnalyzeWebsite\Middleware\TrackVisit::class,
            // ... other middleware
        ]);
    })
    
  3. Configure Driver: In your .env file, add the following to specify the driver for analytics. You can choose between database, queue, or redis.

    ANALYTICS_DRIVER=database
    
    • database: (Default) Saves visit data directly to the database.
    • queue: Pushes visit data to a queue for background processing. Make sure your queue worker is running.
    • redis: Caches visit data in Redis for high performance.
  4. Redis Driver Setup: If you choose to use the redis driver, you need to schedule a command to flush the cached data to the database periodically.

    In your app/Console/Kernel.php, add the following to the schedule method:

    $schedule->command('analytics:flush')->everyMinute();
    
  5. Filament Integration: To display the analytics dashboard in your Filament admin panel, you need to add the AnalyzeWebsitePlugin to your panel provider.

    In your panel provider file (e.g., app/Providers/Filament/AdminPanelProvider.php), add the following to the plugins method:

    ->plugins([
        \Mina\AnalyzeWebsite\Filament\AnalyzeWebsitePlugin::make()
    ])
    

    This will add the analytics page to your Filament admin panel, where you can view the collected data.

    Analytics Dashboard Top Pages and Referrers

The author

mina avatar Author: mina

I am a software developer specializing in building full-stack web applications using Laravel and modern frontend technologies such as React and TypeScript. I focus on creating scalable, maintainable, and well-structured systems, with experience in API development, authentication systems, and database design.

I also work with Filament to build admin panels and custom plugins, and I enjoy extending Laravel applications with reusable packages. I am currently interested in improving my skills in system architecture, performance optimization, and real-time features.

In addition to backend development, I build frontend interfaces using React and Inertia.js, and I integrate third-party services such as payment gateways and real-time communication tools.

I am continuously learning and improving my English communication skills, as well as practicing problem-solving and software design to become a more advanced full-stack developer.

Plugins
1