Simple Laravel provider for Openpanel event tracking.
You can install the package via composer:
composer require bleckert/openpanel-laravelGrab your Openpanel ID and secret by navigating to Settings -> Projects and create a client using typ "Other". You'll then recieve an ID and secret.
Add the following to your .env file:
OPENPANEL_CLIENT_ID=your-id
OPENPANEL_CLIENT_SECRET=your-secretIf you self-host Openpanel, you can set the OPENPANEL_URL variable to your Openpanel URL.
OPENPANEL_URL=https://your-openpanel-url.comuse Bleckert\OpenpanelLaravel\Openpanel;
$openpanel = app(Openpanel::class);
// Set profile ID that will be used for all events as the `profileId` property.
$openpanel->setProfileId(1);
// Update user profile
$openpanel->identify(
profileId: 1,
firstName: 'John Doe',
lastName: 'Doe',
email: '[email protected]',
// ...
);
// Track event
$openpanel->track(
name: 'User registered',
);
// Increment property
$openpanel->increment('visits');
// Decrement property
$openpanel->decrement('visits');Please see CHANGELOG for more information what has changed recently.
Please see CONTRIBUTING for details.
The MIT License (MIT). Please see License File for more information.