Search by

alfasix / alfakit-analytics

faizanakbar10

Privacy-first web analytics for the public site of a Laravel app, viewed in an AlfaKit panel: a cookieless tracking snippet, server-side tracking, daily rollups, goals and a dashboard with filters, comparisons and realtime visitors.

Package info

github.com/alfasixbh/alfakit-analytics

Homepage

Issues

pkg:composer/alfasix/alfakit-analytics

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

v0.1.0 2026-10-18 13:05 UTC

This package is auto-updated.

Last update: 2026-10-18 14:00:33 UTC


README

by Alfa Six

Privacy-first web analytics for the public site of your Laravel app, viewed in an AlfaKit panel, in the spirit of Plausible and Fathom: no cookies, no storage, no persistent identifiers, and no IP addresses stored. It renders in React, Vue and Svelte.

Installation

composer require alfasix/alfakit-analytics
php artisan vendor:publish --tag=alfakit-analytics-migrations
php artisan migrate

Register

use AlfaSix\AlfakitAnalytics\AnalyticsPlugin;

$panel->plugin(
    AnalyticsPlugin::make()
        ->authorize(fn (User $user): bool => $user->is_admin)
        ->navigationGroup('Marketing'),
);

Add a site under Analytics → Sites, then put its snippet on your pages:

@alfakitAnalytics('your-site-key')

or, on Inertia pages, <AlfakitAnalytics siteKey="your-site-key" /> from @alfakit/react, @alfakit/vue or @alfakit/svelte. Track events from the browser (trackAnalyticsEvent('Signup', { plan: 'pro' }), window.alfakit.track(…)) or the server:

use AlfaSix\AlfakitAnalytics\Analytics;

Analytics::track('Signup', ['plan' => 'pro']);

Make sure the Laravel scheduler runs: the plugin aggregates daily rollups hourly.

Features

  • Snippet under 2 KB, React / Vue / Svelte components, server-side tracking and a page-view middleware
  • Do Not Track and Global Privacy Control respected, bot filtering, rate-limited stateless endpoint
  • Daily-rotating salted visitor hashes; old salts are deleted
  • Sources, channels, referrers, UTM campaigns, countries (optional resolver), devices, browsers, OS
  • Dashboard with visitors now, KPIs, a chart, comparison with the previous period and click-to-filter top lists
  • Goals (page or event) with conversion rates, custom event property breakdowns
  • Daily rollups with retention, on MySQL, PostgreSQL and SQLite
  • Tenant-scoped sites, authorize() and policies, CSV / XLSX exports, signed shared dashboards

See the documentation, including what is and isn't collected.

License

MIT. See LICENSE.md.