kilobyteno/laravel-dashboard-plausible-tile

A simple tile for showing Plausible analytics within for your dashboard.

1.2.0 2023-12-10 19:27 UTC

This package is auto-updated.

Last update: 2024-04-29 14:17:35 UTC


README

Latest Version on Packagist GitHub Tests Action Status Total Downloads

A simple tile for showing Plausible analytics within for your dashboard.

This tile can be used on the Laravel Dashboard.

Screenshot 2022-05-30 at 21-27-06 Dashboard

Installation

You can install the package via composer:

composer require kilobyteno/laravel-dashboard-plausible-tile

Publish config for laravel-plausible:

php artisan vendor:publish --tag="plausible-config"

Open config/plausible.php and add your Plausible API Key.

Then add this to config/dashboard.php under the tile key:

'plausible' => [
    'refresh_interval_in_seconds' => 60,
    'domains' => [
        'kilobyte.no',
        'example.com',
    ],
],

Under "schedule" in kernel.php add:

$schedule->command(FetchDataFromPlausibleCommand::class)->everyMinute();

Usage

In your dashboard view you use the livewire:plausible-tile component.

<x-dashboard>
    <livewire:plausible-tile position="a1:a8" />
</x-dashboard>

Customizing the view

If you want to customize the view used to render this tile, run this command:

php artisan vendor:publish --provider="Kilobyteno\PlausibleTile\PlausibleTileServiceProvider" --tag="dashboard-plausible-tile-views"

Testing

composer test

Changelog

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

Contributing

Please see CONTRIBUTING for details.

Security

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

Credits

License

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