PHPackages                             harvv/laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. harvv/laravel

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

harvv/laravel
=============

Behavioral UX analytics for Laravel — detects rage clicks, dead clicks, form abandonment, scroll friction, and Core Web Vitals issues. Server-side context (route name, hashed user ID, request ID) lands in your dashboard so each detected issue is tied to the Laravel route + user that hit it.

v0.1.2(4w ago)04↓100%MITPHPPHP ^8.2

Since May 12Pushed 4w agoCompare

[ Source](https://github.com/AxiomState/harvv-laravel)[ Packagist](https://packagist.org/packages/harvv/laravel)[ Docs](https://harvv.com/laravel)[ RSS](/packages/harvv-laravel/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (7)Versions (3)Used By (0)

harvv/laravel
=============

[](#harvvlaravel)

Behavioral UX analytics for Laravel. Detects rage clicks, dead clicks, form abandonment, scroll friction, and Core Web Vitals issues across every page. Server-side context (route name, hashed user ID, request ID) means each detected issue lands in your dashboard tied to the Laravel route + user that hit it — not just `/checkout`.

> **v0.1.0 — early access.** Stable for production traffic; API may still shift before v1.0. See the bake criteria at the bottom of this README.

**Full developer docs at [docs.harvv.com/laravel](https://docs.harvv.com/laravel)** — this README is the install summary; the docs site has troubleshooting, manual paths, verify procedures, and the broader Harvv overview.

Quick install — pre-Packagist (today)
-------------------------------------

[](#quick-install--pre-packagist-today)

Packagist publish is in progress. Until the listing lands, install via Composer's VCS repository in one line:

```
composer config repositories.harvv vcs https://github.com/AxiomState/harvv-laravel
composer require harvv/laravel:dev-main
php artisan harvv:install
```

That's the entire install. The `harvv:install` command prompts for your site key, generates an HMAC secret, writes both to `.env`, and offers to register the `HarvvContext` middleware automatically. Re-running is safe (idempotent — skips already-done steps).

`dev-main` tracks the `main` branch; tag releases (`v0.1.0`, `v0.1.1`, …) will land as semver becomes meaningful. Pin to a tag in production:

```
composer require harvv/laravel:^0.1
```

Once `harvv/laravel` is live on Packagist, the VCS step disappears — the install reduces to `composer require harvv/laravel` then `php artisan harvv:install`.

Quickstart (2 minutes)
----------------------

[](#quickstart-2-minutes)

> Once Packagist publish completes, this is the only install path you need. Until then, see [Quick install — pre-Packagist](#quick-install--pre-packagist-today).

```
composer require harvv/laravel
php artisan harvv:install
```

Grab your site key from your site's Settings → Install panel ([Studio dashboard](https://harvv.com/site.html#/app), or read the [install doc](https://docs.harvv.com/laravel)). The `harvv:install` command prompts you for it and writes `HARVV_SITE_KEY` (plus `HARVV_HMAC_SECRET`, `HARVV_ENABLED=true`) to your `.env`.

Then drop the pixel into your layout — either Blade directive:

```
{{-- resources/views/layouts/app.blade.php --}}

    {{-- ... your layout ... --}}

    @harvv

```

Or component syntax:

```

    {{-- ... your layout ... --}}

```

Both render the same `` tag. The pixel is ~15.6KB gzipped and loads in parallel with your page.

Server-side context (the wedge)
-------------------------------

[](#server-side-context-the-wedge)

Out of the box, the pixel captures behavior client-side. Add the optional middleware to send the Laravel context Harvv needs to make issues actionable:

```
// bootstrap/app.php  (Laravel 11+)
->withMiddleware(function (Middleware $middleware) {
    $middleware->web(append: [
        \Harvv\Laravel\Http\Middleware\HarvvContext::class,
    ]);
})
```

```
// app/Http/Kernel.php  (Laravel 10 and earlier)
protected $middlewareGroups = [
    'web' => [
        // ...
        \Harvv\Laravel\Http\Middleware\HarvvContext::class,
    ],
];
```

The install command offers to do this for you with a "Recommended — adds server-side context to your Harvv issues. Add now? \[Y/n\]" prompt.

What you get with the middleware:

> **Without:** "Rage click on `/checkout`" **With:** "Rage click on `checkout.show` route, user ``, on third attempt this session"

User IDs are SHA-256 hashed with your site key by default — Harvv never sees your primary keys. Override with `HARVV_CONTEXT_UNHASHED=true` only if your user IDs aren't sensitive AND you've reviewed the implications (the install command prints a warning when it detects this flag).

Compatibility
-------------

[](#compatibility)

LaravelPHPStatus13.x8.3, 8.4✅ Supported (current)12.x8.2, 8.3✅ Supported11.x8.2, 8.3✅ Supported (security-only — upgrade recommended)10.x8.1, 8.2⚠️ Use the generic JS snippet insteadThe CI matrix runs every PR against every valid combination above. See [`/.github/workflows/tests.yml`](./.github/workflows/tests.yml).

What this is NOT
----------------

[](#what-this-is-not)

- **Not a Sentry replacement.** Harvv is browser-side behavior analytics, not server-side error tracking. Use Sentry for your `Throwable`s.
- **Not session replay.** No DOM mutation recording, no video, no reconstruction. We detect issues and suggest fixes instead.
- **Not a Microsoft Clarity replacement** — though they coexist cleanly. See [docs/integrations.md](https://harvv.com/docs/laravel/integrations) for details on running both.

Verifying your install
----------------------

[](#verifying-your-install)

```
php artisan harvv:verify
```

That's the whole checklist. It validates every required + optional piece (site key, HMAC secret, enabled flag, `@harvv` directive, middleware), prints the exact pixel URL to grep for in View Source, and exits non-zero on any required failure so you can gate CI deploys on it.

Troubleshooting
---------------

[](#troubleshooting)

Full troubleshooting at [docs.harvv.com/laravel#troubleshooting](https://docs.harvv.com/laravel#troubleshooting). Top hits:

- **`@harvv` renders empty in view-source.** Either `HARVV_SITE_KEY` is empty or `HARVV_ENABLED=false`. Run `php artisan harvv:verify`. On pre-v0.1.1 installs, `APP_ENV=local` also disabled the pixel — upgrade.
- **`composer require harvv/laravel` — Package not found.** Packagist publish hasn't completed yet. Use the VCS one-liner at the top of this README.
- **Events show up but no Laravel route attached.** `HarvvContext` middleware isn't in the stack, OR the `HARVV_HMAC_SECRET` in `.env` doesn't match the one in Studio. Rotate from Studio → Settings.
- **`php artisan harvv:install` — command not found.** Old install. Run `composer update harvv/laravel`. The command shipped in v0.1.1 (2026-05-12).
- **Telescope/Pulse noise from our outbound POSTs.** Filter `X-Harvv-Internal: 1`requests in your watchers.
- **Filament admin showing pixel.** Add `admin/*` to `config('harvv.context.excluded_routes')` (already in the default list).

Uninstall
---------

[](#uninstall)

```
composer remove harvv/laravel
```

Then remove `HARVV_SITE_KEY`, `HARVV_HMAC_SECRET`, and any `HARVV_*` lines from `.env`. If you registered the middleware manually, remove it from `bootstrap/app.php` or `Kernel.php`.

License
-------

[](#license)

MIT. See [LICENSE](./LICENSE).

Pre-v1.0 bake criteria
----------------------

[](#pre-v10-bake-criteria)

This package is `v0.1.0` until ALL four are true:

- 30 days minimum since first publish
- 10+ real installs in production
- Zero P0 issues reported
- At least one unanticipated bug report (proves real-world stress-testing)

Track progress at [harvv.com/laravel/status](https://harvv.com/laravel/status).

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance94

Actively maintained with recent releases

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

28d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6c11f86ad5e5034e67cf8bf8e7228b94c4a550c8af5392202a604a73992ca606?d=identicon)[AxiomState](/maintainers/AxiomState)

---

Top Contributors

[![harvv-app](https://avatars.githubusercontent.com/u/120074944?v=4)](https://github.com/harvv-app "harvv-app (3 commits)")

---

Tags

laravelBehavioranalyticsuxcore-web-vitalspixelrage-clicksdead-clickssession-analyticsharvv

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/harvv-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/harvv-laravel/health.svg)](https://phpackages.com/packages/harvv-laravel)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3325.1M337](/packages/psalm-plugin-laravel)[tallstackui/tallstackui

TallStackUI is a powerful suite of Blade components that elevate your workflow of Livewire applications.

719160.4k12](/packages/tallstackui-tallstackui)[spatie/laravel-health

Monitor the health of a Laravel application

88011.3M149](/packages/spatie-laravel-health)[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.4k51.0M7.4k](/packages/larastan-larastan)[laravel/ai

The official AI SDK for Laravel.

9782.1M153](/packages/laravel-ai)[laravel/sail

Docker files for running a basic Laravel application.

1.9k199.2M1.2k](/packages/laravel-sail)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
