src/FACTFinder/Adapter/Tracking.php
public function setupTrackingFromRequest($sid = null, $userId = null)
    {
        if (strlen($sid) > 0)
            $this->parameters['sid'] = $sid;
        else if (!isset($this->parameters['sid'])
                 || strlen($this->parameters['sid']) == 0
        ) {
            $this->parameters['sid'] = session_id();
        }

        if (strlen($userId) > 0)
            $this->parameters['userId'] = $userId;
    }
public function setupTrackingFromRequest($sid = null, $userId = null)
    {
        if (strlen($sid) > 0)
            $this->parameters['sid'] = $sid;
        else if (!isset($this->parameters['sid'])
                 || strlen($this->parameters['sid']) == 0
        ) {
            $this->parameters['sid'] = session_id();
        }

        if (strlen($userId) > 0)
            $this->parameters['userId'] = $userId;
    }
Use this method directly if you want to separate the setup from sending
the request. This is particularly useful when using the
MultiCurlRequestFactory.

@param string $sid session id
@param string $userId id of user