PHP 클래스 Piwik\Plugins\Live\API
The method "getLastVisitsDetails" will return extensive data for each visit, which includes: server time, visitId, visitorId,
visitorType (new or returning), number of pages, list of all pages (and events, file downloaded and outlinks clicked),
custom variables names and values set to this visit, number of goal conversions (and list of all Goal conversions for this visit,
with time of conversion, revenue, URL, etc.), but also other attributes such as: days since last visit, days since first visit,
country, continent, visitor IP,
provider, referrer used (referrer name, keyword if it was a search engine, full URL), campaign name and keyword, operating system,
browser, type of screen, resolution, supported browser plugins (flash, java, silverlight, pdf, etc.), various dates & times format to make
it easier for API users... and more!
With the parameter
'&segment=' you can filter the
returned visits by any criteria (visitor IP, visitor ID, country, keyword used, time of day, etc.).
The method "getCounters" is used to return a simple counter: visits, number of actions, number of converted visits, in the last N minutes.
See also the documentation about
Real time widget and visitor level reports in Piwik.
파일 보기
프로젝트 열기: piwik/piwik
1 사용 예제들
공개 메소드들
메소드 |
설명 |
|
__construct ( Psr\Log\LoggerInterface $logger ) |
|
|
getCounters ( integer $idSite, integer $lastMinutes, boolean | string $segment = false, array $showColumns = [], array $hideColumns = [] ) : array( |
This will return simple counters, for a given website ID, for visits over the last N minutes |
|
getLastVisits ( $idSite, $filter_limit = 10, $minTimestamp = false ) |
|
|
getLastVisitsDetails ( integer $idSite, boolean | string $period = false, boolean | string $date = false, boolean | integer $segment = false, boolean | integer $countVisitorsToFetch = false, boolean | integer $minTimestamp = false, boolean $flat = false, boolean $doNotFetchActions = false ) : DataTable |
Returns the last visits tracked in the specified website
You can define any number of filters: none, one, many or all parameters can be defined |
|
getLastVisitsForVisitor ( integer $visitorId, integer $idSite, integer $filter_limit = 10, boolean $flat = false ) : DataTable |
The same functionality can be obtained using segment=visitorId==$visitorId with getLastVisitsDetails |
|
getMostRecentVisitorId ( integer $idSite, boolean | string $segment = false ) : string |
Returns the visitor ID of the most recent visit. |
|
getVisitorProfile ( integer $idSite, boolean | false | string $visitorId = false, boolean | false | string $segment = false, boolean | false | integer $limitVisits = false ) : array |
Returns an array describing a visitor using her last visits (uses a maximum of 100). |
|
비공개 메소드들
메소드 |
설명 |
|
addFilterToCleanVisitors ( DataTable $dataTable, integer $idSite, boolean $flat = false, boolean $doNotFetchActions = false, boolean $filterNow = false ) |
For an array of visits, query the list of pages for this visit
as well as make the data human readable |
|
loadLastVisitorDetailsFromDatabase ( $idSite, $period, $date, $segment = false, $offset, $limit = 100, $minTimestamp = false, $filterSortOrder = false, $visitorId = false ) |
|
|
makeVisitorTableFromArray ( $data ) : DataTable |
|
|
shouldColumnBePresentInResponse ( $column, $showColumns, $hideColumns ) |
|
|
메소드 상세
public __construct ( Psr\Log\LoggerInterface $logger ) |
$logger |
Psr\Log\LoggerInterface |
|
This will return simple counters, for a given website ID, for visits over the last N minutes
public getCounters ( integer $idSite, integer $lastMinutes, boolean | string $segment = false, array $showColumns = [], array $hideColumns = [] ) : array( |
$idSite |
integer |
Id Site |
$lastMinutes |
integer |
Number of minutes to look back at |
$segment |
boolean | string |
|
$showColumns |
array |
The columns to show / not to request. Eg 'visits', 'actions', ... |
$hideColumns |
array |
The columns to hide / not to request. Eg 'visits', 'actions', ... |
리턴 |
array( |
|
public getLastVisits ( $idSite, $filter_limit = 10, $minTimestamp = false ) |
getLastVisitsDetails()
공개 메소드
Returns the last visits tracked in the specified website
You can define any number of filters: none, one, many or all parameters can be defined
getLastVisitsForVisitor()
공개 메소드
The same functionality can be obtained using segment=visitorId==$visitorId with getLastVisitsDetails
getMostRecentVisitorId()
공개 메소드
Returns the visitor ID of the most recent visit.
getVisitorProfile()
공개 메소드
Returns an array describing a visitor using her last visits (uses a maximum of 100).