Segment_Client::track PHP Method

track() public method

Tracks a user action
public track ( array $message ) : [boolean]
$message array
return [boolean]
    public function track(array $message)
    {
        $message = $this->message($message, "properties");
        $message["type"] = "track";
        return $this->consumer->track($message);
    }

Usage Example

 function testProductionProblems()
 {
     # Open to a place where we should not have write access.
     $client = new Segment_Client("oq0vdlg7yi", array("consumer" => "file", "filename" => "/dev/xxxxxxx"));
     $tracked = $client->track(array("userId" => "some-user", "event" => "my event"));
     $this->assertFalse($tracked);
 }
All Usage Examples Of Segment_Client::track