# Track Events
This package was created to really simplify sending both app and models events from a Laravel application to external analytics services.
use MOIREI\EventTracking\Facades\Events;
Events::track("New Order", $order);
Declaring the Events facade is optional.
# Channels
This package comes with in-built channels for Mixpanel
and GA
.
Neither of these channels are unit tested at this time. However,
Mixpanel
is fully production ready.
# Send event to all avaialble channels
Events::all()->track('my-event');
# Send event to only a few channels
Events::only('mixpanel', 'ga')->track('my-event');
// or
Events::only(['mixpanel', 'ga'])->track('my-event');
# Send event to all channels except a few channels
Events::except('mixpanel', 'ga')->track('my-event');
// or
Events::except(['mixpanel', 'ga'])->track('my-event');