PHP Class Piwik\Plugins\Live\Model

Inheritance: implements Piwik\Db\FactoryCreated
Show file Open project: piwik/piwik Class Usage Examples

Public Methods

Method Description
getNumActions ( $idSite, $lastMinutes, $segment ) : integer
getNumVisitors ( $idSite, $lastMinutes, $segment ) : integer
getNumVisits ( $idSite, $lastMinutes, $segment ) : integer
getNumVisitsConverted ( $idSite, $lastMinutes, $segment ) : integer
makeLogVisitsQueryString ( $idSite, $period, $date, $segment, integer $offset, integer $limit, $visitorId, $minTimestamp, $filterSortOrder ) : array
queryActionsForVisit ( $idVisit, $actionsLimit ) : array
queryAdjacentVisitorId ( integer $idSite, string $visitorId, string $visitLastActionTime, string $segment, boolean $getNext ) : string Returns the ID of a visitor that is adjacent to another visitor (by time of last action) in the log_visit table.
queryEcommerceConversionsForVisit ( $idVisit, $limit ) : array
queryEcommerceItemsForOrder ( $idVisit, $idOrder, $actionsLimit ) : array
queryGoalConversionsForVisit ( $idVisit, $limit ) : array
queryLogVisits ( $idSite, $period, $date, $segment, $offset, $limit, $visitorId, $minTimestamp, $filterSortOrder ) : array

Protected Methods

Method Description
makeSite ( $idSite ) : Site

Private Methods

Method Description
getIdSitesWhereClause ( $idSite, string $table = 'log_visit' ) : array
getLastMinutesCounterForQuery ( $idSite, $lastMinutes, $segment, $select, $from, $where )
getWhereClauseAndBind ( string $whereClause, array $bindIdSites, $idSite, $period, $date, $visitorId, $minTimestamp ) : array

Method Details

getNumActions() public method

public getNumActions ( $idSite, $lastMinutes, $segment ) : integer
$idSite
$lastMinutes
$segment
return integer

getNumVisitors() public method

public getNumVisitors ( $idSite, $lastMinutes, $segment ) : integer
$idSite
$lastMinutes
$segment
return integer

getNumVisits() public method

public getNumVisits ( $idSite, $lastMinutes, $segment ) : integer
$idSite
$lastMinutes
$segment
return integer

getNumVisitsConverted() public method

public getNumVisitsConverted ( $idSite, $lastMinutes, $segment ) : integer
$idSite
$lastMinutes
$segment
return integer

makeLogVisitsQueryString() public method

public makeLogVisitsQueryString ( $idSite, $period, $date, $segment, integer $offset, integer $limit, $visitorId, $minTimestamp, $filterSortOrder ) : array
$idSite
$period
$date
$segment
$offset integer
$limit integer
$visitorId
$minTimestamp
$filterSortOrder
return array

makeSite() protected method

protected makeSite ( $idSite ) : Site
$idSite
return Piwik\Site

queryActionsForVisit() public method

public queryActionsForVisit ( $idVisit, $actionsLimit ) : array
$idVisit
$actionsLimit
return array

queryAdjacentVisitorId() public method

Returns the ID of a visitor that is adjacent to another visitor (by time of last action) in the log_visit table.
public queryAdjacentVisitorId ( integer $idSite, string $visitorId, string $visitLastActionTime, string $segment, boolean $getNext ) : string
$idSite integer The ID of the site whose visits should be looked at.
$visitorId string The ID of the visitor to get an adjacent visitor for.
$visitLastActionTime string The last action time of the latest visit for $visitorId.
$segment string
$getNext boolean Whether to retrieve the next visitor or the previous visitor. The next visitor will be the visitor that appears chronologically later in the log_visit table. The previous visitor will be the visitor that appears earlier.
return string The hex visitor ID.

queryEcommerceConversionsForVisit() public method

public queryEcommerceConversionsForVisit ( $idVisit, $limit ) : array
$idVisit
$limit
return array

queryEcommerceItemsForOrder() public method

public queryEcommerceItemsForOrder ( $idVisit, $idOrder, $actionsLimit ) : array
$idVisit
$idOrder
$actionsLimit
return array

queryGoalConversionsForVisit() public method

public queryGoalConversionsForVisit ( $idVisit, $limit ) : array
$idVisit
$limit
return array

queryLogVisits() public method

public queryLogVisits ( $idSite, $period, $date, $segment, $offset, $limit, $visitorId, $minTimestamp, $filterSortOrder ) : array
$idSite
$period
$date
$segment
$limit
$visitorId
$minTimestamp
$filterSortOrder
return array