ekremogul/filament-google-analytics-realtime

This is my package filament-google-analytics-realtime

v1.0.1 2023-05-26 09:31 UTC

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Installation

You can install the package via composer:

composer require ekremogul/filament-google-analytics-realtime

You can publish the config file with:

php artisan vendor:publish --tag="filament-google-analytics-realtime-config"

This is the contents of the published config file:

return [
    'view_id' => '',
    'key_file' => storage_path('app/analytics/service-account-credentials.json'),
    'interval' => '60s',
];

Important

How to obtain the credentials to communicate with Google Analytics

Please follow the steps in spatie's description to get the view_id and service-account-credentials.json files

Optionally, you can publish the translation

php artisan vendor:publish --tag="filament-google-analytics-realtime-translations"

Usage

Add to config/filament.php file

....
    'widgets' => [
        'namespace' => 'App\\Filament\\Widgets',
        'path' => app_path('Filament/Widgets'),
        'register' => [
            ....
            \Ekremogul\FilamentGoogleAnalyticsRealtime\Widgets\RealtimeAnalytics::class,
        ],
    ],
....

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.