<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
clearanalytics / filament-clearanalytics example snippets
use ClearAnalytics\Filament\ClearAnalyticsPlugin;
public function panel(Panel $panel): Panel
{
return $panel
// ...
->plugin(ClearAnalyticsPlugin::make());
}
->plugin(
ClearAnalyticsPlugin::make()
->token(env('CLEARANALYTICS_API_TOKEN'))
->site('01JM...') // default site id
->defaultPeriod('30d')
->cacheTtl(600)
->ecommerce(true) // toggle the e-commerce widgets
->goals(true) // toggle the goals widget
->live(false) // toggle the live-visitors widget
->registerOnDashboard() // also push selected widgets onto the panel's main dashboard
)
use ClearAnalytics\Filament\Widgets\OverviewStatsWidget;
protected function getHeaderWidgets(): array
{
return [OverviewStatsWidget::class];
}