Piwik\Plugins\Goals\API::getDaysToConversion PHP Method

getDaysToConversion() public method

Gets a DataTable that maps ranges of days to the number of conversions that occurred within those ranges, for the specified site, date range, segment and goal.
public getDaysToConversion ( integer $idSite, string $period, string $date, string | boolean $segment = false, integer | boolean $idGoal = false ) : false | DataTable
$idSite integer The site to select data from.
$period string The period type.
$date string The date type.
$segment string | boolean The segment.
$idGoal integer | boolean The id of the goal to get data for. If this is set to false, data for every goal that belongs to $idSite is returned.
return false | Piwik\DataTable
    public function getDaysToConversion($idSite, $period, $date, $segment = false, $idGoal = false)
    {
        $dataTable = $this->getGoalSpecificDataTable(Archiver::DAYS_UNTIL_CONV_RECORD_NAME, $idSite, $period, $date, $segment, $idGoal);
        $dataTable->queueFilter('Sort', array('label', 'asc', true, false));
        $dataTable->queueFilter('BeautifyRangeLabels', array(Piwik::translate('Intl_OneDay'), Piwik::translate('Intl_NDays')));
        return $dataTable;
    }