hatchetaustralia / segment
A driver-based Segment Analytics library for PHP
Installs: 1 307
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: ^8.1
- guzzlehttp/guzzle: ^7.5
- illuminate/contracts: ^9.0|^10.0|^11.0
- illuminate/support: ^9.0|^10.0|^11.0
- segmentio/analytics-php: ^3.7
- spatie/data-transfer-object: ^3.7
- spatie/laravel-package-tools: ^1.13
Requires (Dev)
- laravel/pint: ^1.5
- matthiasmullie/minify: ^1.3
- nunomaduro/larastan: ^2.2
- orchestra/testbench: ^8.0
- pestphp/pest: ^2.0
- phpstan/phpstan: ^1.10
- symfony/var-dumper: ^6.2
README
WIP Laravel Segment integration using drivers
Example Usage
Segment::track('itemAddedToCart', [ 'sku' => $sku, ]); Segment::driver()->track('itemAddedToCart', [ 'sku' => $sku, ]); Segment::driver('queue')->track('itemAddedToCart', [ 'sku' => $sku, ]);
Available Drivers:
WIP
stack
: Dispatches the Segment events to various drivers- Can configure various other drivers to write to.
sync
: Dispatches the Segment events immediatelyafter
: Dispatches the Segment events after the responsequeue
: Dispatches the Segment events via a queue worker- Can configure the queue connection and queue name
log
: Dispatches the Segment events to a log channel- Can configure the logger channel
eloquent
: Dispatches the Segment events to a model/the DB.- Can configure the model to use
null
: Dispatches the Segment events to the void
Anayltics 2.0 JS Proxy
WIP