public function session($sourceId, $sessionHash, $remoteIp, $userAgent, $userId = null)
    {
        $parameters = [
            'query' => [],
            'body' => json_encode(['sourceId' => $sourceId, 'sessionHash' => $sessionHash, 'remoteIp' => $remoteIp, 'userAgent' => $userAgent, 'userId' => $userId], JSON_UNESCAPED_UNICODE),
            'headers' => [],
        ];

        $result = $this->post('v1/events/session', $parameters);

        return $result;
    }
public function session($sourceId, $sessionHash, $remoteIp, $userAgent, $userId = null)
    {
        $parameters = [
            'query' => [],
            'body' => json_encode(['sourceId' => $sourceId, 'sessionHash' => $sessionHash, 'remoteIp' => $remoteIp, 'userAgent' => $userAgent, 'userId' => $userId], JSON_UNESCAPED_UNICODE),
            'headers' => [],
        ];

        $result = $this->post('v1/events/session', $parameters);

        return $result;
    }
public function session ( $ sourceId , $ sessionHash , $ remoteIp , $ userAgent , $ userId = null ) { $ parameters = [ 'query' => [ ] , 'body' => json_encode ( [ 'sourceId' => $ sourceId , 'sessionHash' => $ sessionHash , 'remoteIp' => $ remoteIp , 'userAgent' => $ userAgent , 'userId' => $ userId ] , JSON_UNESCAPED_UNICODE ) , 'headers' => [ ] , ] ; $ result = $ this -> post ( 'v1/events/session' , $ parameters ) ; return $ result ; }
Creates a sessionId.

SessionId must be sent along with all subsequent requests to track events.

@param int    $sourceId    the source we should log things on
@param string $sessionHash Some sort of identifier for the user
@param string $remoteIp    Ip-address of the user
@param string $userAgent   the User Agent of the user
@param int    $userId      Optional override value for the user id
Creates a sessionId .