Download the PHP package abr4xas/clarity-laravel without Composer
On this page you can find all versions of the php package abr4xas/clarity-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download abr4xas/clarity-laravel
More information about abr4xas/clarity-laravel
Files in abr4xas/clarity-laravel
Package clarity-laravel
Short Description Easy integration of Microsoft Clarity into your Laravel application.
License MIT
Homepage https://github.com/abr4xas/clarity-laravel
Informations about the package clarity-laravel
Microsoft Clarity for Laravel.
Easy integration of Microsoft Clarity into your Laravel application.
Installation
You can install the package via composer:
You can publish the config file with:
This is the contents of the published config file:
Optionally, you can publish the views using
Usage
General Tracking
- 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.
Identify API
To implement the Identify API, use identify
component.
Set CLARITY_IDENTIFICATION_ENABLED
value to true
on the env file.
Attributes:
user
attribute is required accepts the User Model instance or any object. Theemail
andname
attributes are used.enabled
attribute is optional.custom_session_id
attribute is optional.custom_page_id
attribute is optional.
This will compile as:
Testing
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
- Angel
- All Contributors
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.