PHPackages                             iugosds/sherlaravel - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. iugosds/sherlaravel

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

iugosds/sherlaravel
===================

Sherlock Score integration for Laravel projects

0.1(6y ago)0935MITPHPCI failing

Since Feb 1Pushed 5y ago1 watchersCompare

[ Source](https://github.com/iugosds/sherlaravel)[ Packagist](https://packagist.org/packages/iugosds/sherlaravel)[ Docs](https://github.com/iugosds/sherlaravel)[ RSS](/packages/iugosds-sherlaravel/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (5)Versions (8)Used By (0)

SherLaravel: a Sherlock Score integration for Laravel
=====================================================

[](#sherlaravel-a-sherlock-score-integration-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/c25e4039266408a9b0aec34d6a4decf5d195fe89912788694006094e208b240c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6975676f7364732f736865726c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/iugosds/sherlaravel)[![Total Downloads](https://camo.githubusercontent.com/bca6b6d80fe37ce8591e90e1fe27255feb73bd33bb9e628a04367472feb9beb4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6975676f7364732f736865726c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/iugosds/sherlaravel)

[Sherlock Score](https://www.sherlockscore.com/ "Sherlock Score's Homepage") integration for Laravel.

Track your users, trials, and paid accounts with Sherlock’s Product Engagement Scoring engine.

Installation
------------

[](#installation)

Via Composer

```
$ composer require iugosds/sherlaravel
```

Usage
-----

[](#usage)

First of all, add a SHERLOCK\_SCORE\_API\_KEY key to your .env file:

```
SHERLOCK_SCORE_API_KEY=a12b34c56...
```

You can also disable this package by adding a SHERLOCK\_SCORE\_ENABLED key set to false (true by default).

In case you don't want to wait for the API to respond, you can run all interactions with Sherlock Scores as asynchronous calls (jobs will be dispatched to the "default" queue of your laravel application). To enable this feature, set the SHERLOCK\_ASYNC\_CALLS variable to true in your .env file.

To start interacting with Sherlock Score, use the following methods:

```
use SherLaravel;
```

```
SherLaravel::identifyAccount("groupIdHere");
```

With Sherlock you can keep track of Accounts (or groups of users). To identfy a new account, add the line above to your controller.

```
SherLaravel::identifyUser("userIdHere");
```

The identifyUser method is used to identify a new User. It will be tipically added to the register method on your login controller, or to the "created" event of your User Model in case you are using Observers.

```
SherLaravel::trackEvent("userID", "event-name");
```

In your controllers, use the trackEvent method every time you want to track an interaction with a user.

```
SherLaravel::identifyAccount(String $group_id, ?Array $traits= [], ?int $timestamp = null)
SherLaravel::identifyUser(String $user_id, ?String $group_id = null, ?Array $traits= [], ?int $timestamp = null)
SherLaravel::trackEvent(String $user_id, String $event, ?int $timestamp = null)
```

\##Sample:

```
SherLaravel::identifyUser("1234", "Customer44", [
        'name' => 'John Doe',
        'email' => 'johndoe@example.com'],
    '1553647710707');
```

Change log
----------

[](#change-log)

Please see the [changelog](changelog.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [contributing.md](contributing.md) for details and a todolist.

Credits
-------

[](#credits)

- [Gonzalo Medeiros](https://github.com/iugosds)
- [All Contributors](../../contributors)

License
-------

[](#license)

MIT. Please see the [license file](license.md) for more information.

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 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 ~2 days

Total

6

Last Release

2334d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3370868?v=4)[Gonzalo Medeiros](/maintainers/gmedeiros)[@gmedeiros](https://github.com/gmedeiros)

---

Top Contributors

[![gmedeiros](https://avatars.githubusercontent.com/u/3370868?v=4)](https://github.com/gmedeiros "gmedeiros (22 commits)")

---

Tags

laravelSherLaravel

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/iugosds-sherlaravel/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M10](/packages/renatomarinho-laravel-page-speed)[vinkius-labs/laravel-page-speed

Laravel Page Speed

2.5k12.5k1](/packages/vinkius-labs-laravel-page-speed)[emargareten/inertia-modal

Inertia Modal is a Laravel package that lets you implement backend-driven modal dialogs for Inertia apps.

90142.9k](/packages/emargareten-inertia-modal)[wearepixel/laravel-cart

A cart implementation for Laravel

1374.8k](/packages/wearepixel-laravel-cart)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

119.4k](/packages/tomshaw-electricgrid)

PHPackages © 2026

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