The go-to PHP IDE with extensive out-of-the-box support for Laravel and its ecosystem.

Clarity Laravel

abr4xas/clarity-laravel image

Clarity Laravel stats

Downloads
4
Stars
6
Open Issues
0
Forks
0

View on GitHub →

Easy integration of Microsoft Clarity into your Laravel application.

Microsoft Clarity for Laravel.

Easy integration of Microsoft Clarity into your Laravel application.

Installation

You can install the package via composer:

composer require abr4xas/clarity-laravel

You can publish the config file with:

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

This is the contents of the published config file:

<?php
 
return [
'id' => env('CLARITY_ID', 'XXXXXX'),
'enabled' => env('CLARITY_ENABLED', true),
];

Optionally, you can publish the views using

php artisan vendor:publish --tag="clarity-views"

Usage

  • Create an account: The first thing you need to do is create an account on Microsoft Clarity. You can sign up on their website and follow the steps to create your account. Then, get your tracking code and that's it.
  • Simply add the blade components to your base layout files.

The enabled attribute is optional, but can be used to control the tags integration from blade files that extend the base layout. It accepts true/false. This can still be controlled globally via the .env file should you need to disable the integration global on different environments as well.

<!-- Should be placed in the head -->
<x-clarity::script :enabled="$enabled" />

Testing

composer test

Changelog

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

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

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

Credits

License

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

This package is strongly inspired by Google Tag Manager for Laravel created by @awcodes.

abr4xas photo

SR Backend (PHP / Laravel / WordPress) developer.

Cube

Laravel Newsletter

Join 40k+ other developers and never miss out on new tips, tutorials, and more.


Abr4Xas Clarity Laravel Related Articles

Matt Stauffer Joins the PHP Foundation Board — What It Means for Laravel image

Matt Stauffer Joins the PHP Foundation Board — What It Means for Laravel

Read article
Cache Without Overlapping in Laravel 12.47.0 image

Cache Without Overlapping in Laravel 12.47.0

Read article
Translatable Enums image

Translatable Enums

Read article
Simplifying Form Validation with Laravel Livewire's #[Validate] Attribute image

Simplifying Form Validation with Laravel Livewire's #[Validate] Attribute

Read article
Laravel's UsePolicy Attribute: Explicit Authorization Control image

Laravel's UsePolicy Attribute: Explicit Authorization Control

Read article
Enhancing Laravel Queries with Reusable Scope Patterns image

Enhancing Laravel Queries with Reusable Scope Patterns

Read article
Laravel Cloud logo

Laravel Cloud

Easily create and manage your servers and deploy your Laravel applications in seconds.

Laravel Cloud
Lucky Media logo

Lucky Media

Get Lucky Now - the ideal choice for Laravel Development, with over a decade of experience!

Lucky Media
Acquaint Softtech logo

Acquaint Softtech

Acquaint Softtech offers AI-ready Laravel developers who onboard in 48 hours at $3000/Month with no lengthy sales process and a 100 percent money-back guarantee.

Acquaint Softtech
Blastup logo

Blastup

Blastup provides social media enhancement services including buying Instagram likes, followers, and views, with features like instant delivery and a variety of packages to suit different needs.

Blastup
Typesense Search logo

Typesense Search

Typesense is an open source, blazing-fast search engine, optimized for helping you build delightful search experiences for your sites and apps. Natively integrated with Laravel Scout.

Typesense Search
Honeybadger logo

Honeybadger

Simple developer-focused application monitoring for Laravel. Error tracking, log management, uptime monitoring, status pages, and more!

Honeybadger