Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
clarity-development
jeffersongoncalves/laravel-clarity
claude-code
clarity
blade
settings
analytics
filament
vendor-publish

Add Microsoft Clarity (heatmaps, session recordings) to a Laravel app with jeffersongoncalves/laravel-clarity — Blade include, database-stored project ID via spatie/laravel-settings.

Install
php artisan boost:add-skill jeffersongoncalves/laravel-clarity

Save this content to: .claude/skills/clarity-development/SKILL.md

# Laravel Clarity Development

## When to use this skill

- Adding Microsoft Clarity tracking to a Laravel / Blade app
- Changing the Clarity project ID at runtime (admin panel, seeder, tinker)
- Debugging why the Clarity tag doesn't show up

## Setup

```bash
composer require jeffersongoncalves/laravel-clarity
php artisan vendor:publish --tag=clarity-settings-migrations
php artisan migrate
```

```blade
{{-- resources/views/layouts/app.blade.php, inside <head> --}}
@include('clarity::script')
```

```php
$settings = clarity_settings();
$settings->project_id = 'abcd1234ef'; // Clarity > Settings > Setup
$settings->save();
```

## Settings

| Setting | Type | Default |
|---------|------|---------|
| `project_id` | `?string` | `null` |

## Troubleshooting

- **No tag in the HTML**: `project_id` is empty or not alphanumeric — check `clarity_settings()->hasValidProjectId()`.
- **Settings not found**: run the settings migration (`php artisan migrate` after publishing).
- **Filament panel**: use `jeffersongoncalves/filament-clarity`, which injects the same view into panels and adds a settings page.

Laravel Clarity Development

When to use this skill

  • Adding Microsoft Clarity tracking to a Laravel / Blade app
  • Changing the Clarity project ID at runtime (admin panel, seeder, tinker)
  • Debugging why the Clarity tag doesn't show up

Setup

composer require jeffersongoncalves/laravel-clarity
php artisan vendor:publish --tag=clarity-settings-migrations
php artisan migrate
{{-- resources/views/layouts/app.blade.php, inside <head> --}}
@include('clarity::script')
$settings = clarity_settings();
$settings->project_id = 'abcd1234ef'; // Clarity > Settings > Setup
$settings->save();

Settings

Setting Type Default
project_id ?string null

Troubleshooting

  • No tag in the HTML: project_id is empty or not alphanumeric — check clarity_settings()->hasValidProjectId().
  • Settings not found: run the settings migration (php artisan migrate after publishing).
  • Filament panel: use jeffersongoncalves/filament-clarity, which injects the same view into panels and adds a settings page.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
mehedimi/laravel-amp-mail
happones/laravel-vue-i18n-generator
jwerd/inertia-table
siberfx/flysystem-wasabi
hollyit/token-replace
ippanelcom/laravel-sdk
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel