placetopay / analytics-tracker
There is no license information available for the latest version (1.0.1) of this package.
Track user interactions or system events
1.0.1
2024-04-26 19:13 UTC
Requires
- php: ^8.2
- mixpanel/mixpanel-php: ^2.11
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.38
- orchestra/testbench: ^6.0
- phpunit/phpunit: ^9.6
This package is auto-updated.
Last update: 2024-04-26 19:17:52 UTC
README
Package to track events on your application
Prerequisites
php8.2+
Laravel 9+
Installation
This package can be installed via composer:
composer require "placetopay/analytics-tracker"
Supported analytics trackers
Usage
Add the following variables to your .env:
- MIXPANEL_ENABLED=true
- MIXPANEL_PROJECT_TOKEN={{token}}
use Placetopay\AnalyticsTracker\Facades\Analytics; Analytics::setIdentifier("user@company.com") // (optional) Associate a user to the tracked events ->setDefaultPayload(['key' => 'value']) // Set the default data to be sent on every track call ->track('Label', ['key' => 'value']); // Tracks an event