PHP code example of lifeonscreen / segment
1. Go to this page and download the library: Download lifeonscreen/segment library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
lifeonscreen / segment example snippets
Segment::identify([
"userId" => "12345abcde",
"traits" => [
"name" => "James Brooks",
"email" => "[email protected]",
]
]);
Segment::track([
"userId" => "12345abcde",
"event" => "Did something",
"properties" => [
"was_awesome" => true,
]
]);
bash
$ php artisan vendor:publish