public function doBulkTrack()
    {
        if (empty($this->storedTrackingActions)) {
            throw new Exception(
                "Error:  you must call the function doTrackPageView or doTrackGoal from this class,
                 before calling this method doBulkTrack()"
            );
        }

        $data = array('requests' => $this->storedTrackingActions);

        // token_auth is not required by default, except if bulk_requests_require_authentication=1
        if (!empty($this->token_auth)) {
            $data['token_auth'] = $this->token_auth;
        }

        $postData = json_encode($data);
        $response = $this->sendRequest($this->getBaseUrl(), 'POST', $postData, $force = true);

        $this->storedTrackingActions = array();

        return $response;
    }