I’m looking to implement Segment, an analytics tool. I’m using the install guide.
There a 3 basic steps:
- Add https://github.com/segmentio/analytics-php
- Add the file - require_once("/path/to/analytics-php/lib/Segment.php")
- Initialise Class - Segment::init(“KEY”)
I am installing via Composer (composer require segmentio/analytics-php), but am not sure how to implement the Class. Currently I am receiving ‘Class ‘App\Segment’ not found’.
The question: How do I make the Class (Segment) available in my setup file? Is it auto loaded when added to the composer file?