Laravel A/B - Capturing Events
If you want to send your events to Pivotal Intelligence, you must configure the library to listen for save events. Add the following to your EventServiceProvider
:
....
use pivotalso\PivotalAb\Events\Track;
use pivotalso\PivotalAb\Listeners\TrackerLogger;
class EventServiceProvider extends ServiceProvider {
protected $listen = [
...,
Track::class => [
TrackerLogger::class,
],
];
as well as add your .env file
LARAVEL_AB_API_KEY="<key value>"
You can get your api key from your project settings page on Pivotal Intelligence.