Download the PHP package iugosds/sherlaravel without Composer
On this page you can find all versions of the php package iugosds/sherlaravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download iugosds/sherlaravel
More information about iugosds/sherlaravel
Files in iugosds/sherlaravel
Package sherlaravel
Short Description Sherlock Score integration for Laravel projects
License MIT
Homepage https://github.com/iugosds/sherlaravel
Informations about the package sherlaravel
SherLaravel: a Sherlock Score integration for Laravel
Sherlock Score integration for Laravel.
Track your users, trials, and paid accounts with Sherlock’s Product Engagement Scoring engine.
Installation
Via Composer
Usage
First of all, add a SHERLOCK_SCORE_API_KEY key to your .env file:
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:
With Sherlock you can keep track of Accounts (or groups of users). To identfy a new account, add the line above to your controller.
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.
In your controllers, use the trackEvent method every time you want to track an interaction with a user.
Sample:
Change log
Please see the changelog for more information on what has changed recently.
Contributing
Please see contributing.md for details and a todolist.
Credits
- Gonzalo Medeiros
- All Contributors
License
MIT. Please see the license file for more information.