Свойство | Type | Description | |
---|---|---|---|
$isAuthenticated | |||
$params | array | ||
$rawParams | |||
$tokenAuth |
Méthode | Description | |
---|---|---|
__construct ( $params, boolean | string $tokenAuth = false ) | ||
authenticateSuperUserOrAdmin ( $tokenAuth, $idSite ) | ||
getBrowserLanguage ( ) : string | Returns the language the visitor is viewing. | |
getCurrentTimestamp ( ) | ||
getCustomVariables ( $scope ) | ||
getCustomVariablesInPageScope ( ) | ||
getCustomVariablesInVisitScope ( ) | ||
getDaysSinceFirstVisit ( ) : float | integer | ||
getDaysSinceLastOrder ( ) : boolean | float | integer | ||
getDaysSinceLastVisit ( ) : float | integer | ||
getForcedUserId ( ) | ||
getForcedVisitorId ( ) | ||
getGoalRevenue ( $defaultGoalRevenue ) | ||
getIdSite ( ) | ||
getIp ( ) | ||
getIpString ( ) : mixed | string | ||
getLocalTime ( ) : string | ||
getMetadata ( string $pluginName, string $key ) : mixed | Get a request metadata value. Returns null if none exists. | |
getPageGenerationTime ( ) | 1 hour | |
getParam ( $name ) | ||
getParams ( ) | ||
getPlugins ( ) | ||
getRawParams ( ) : array | Get the params that were originally passed to the instance. These params do not contain any params that were added within this object. | |
getTokenAuth ( ) | ||
getUserAgent ( ) | ||
getUserIdHashed ( $userId ) : string | Matches implementation of PiwikTracker::getUserIdHashed | |
getVisitCount ( ) : integer | mixed | ||
getVisitorId ( ) | Returns the ID from the request in this order: return from a given User ID, or from a Tracking API forced Visitor ID, or from a Visitor ID from 3rd party (optional) cookies, or from a given Visitor Id from 1st party? | |
isAuthenticated ( ) : boolean | ||
isEmptyRequest ( ) | ||
setCurrentTimestamp ( $timestamp ) | ||
setMetadata ( string $pluginName, string $key, mixed $value ) | Set a request metadata value. | |
setParam ( $name, $value ) | ||
setThirdPartyCookie ( $idVisitor ) | Update the cookie information. | |
truncateCustomVariable ( $input ) |
Méthode | Description | |
---|---|---|
authenticateTrackingApi ( $tokenAuth ) | This method allows to set custom IP + server time + visitor ID, when using Tracking API. | |
getCookieExpire ( ) | ||
getCookieName ( ) | ||
getCookiePath ( ) | ||
getCurrentDate ( string $format = "Y-m-d" ) : string | Returns the current date in the "Y-m-d" PHP format | |
getCustomTimestamp ( ) | ||
isTimestampValid ( $time, $now = null ) : boolean | Returns true if the timestamp is valid ie. timestamp is sometime in the last 10 years and is not in the future. | |
makeThirdPartyCookieUID ( ) | ||
shouldUseThirdPartyCookie ( ) |
Méthode | Description | |
---|---|---|
hasParam ( $name ) | ||
truncateIdAsVisitorId ( $idVisitor ) : string |
public __construct ( $params, boolean | string $tokenAuth = false ) | ||
$params | ||
$tokenAuth | boolean | string |
public static authenticateSuperUserOrAdmin ( $tokenAuth, $idSite ) |
protected authenticateTrackingApi ( $tokenAuth ) |
public getBrowserLanguage ( ) : string | ||
Résultat | string | browser language code, eg. "en-gb,en;q=0.5" |
protected getCurrentDate ( string $format = "Y-m-d" ) : string | ||
$format | string | |
Résultat | string |
public getDaysSinceFirstVisit ( ) : float | integer | ||
Résultat | float | integer |
public getDaysSinceLastVisit ( ) : float | integer | ||
Résultat | float | integer |
public getRawParams ( ) : array | ||
Résultat | array |
public getUserIdHashed ( $userId ) : string | ||
$userId | ||
Résultat | string |
public getVisitorId ( ) |
protected isTimestampValid ( $time, $now = null ) : boolean | ||
$time | int Timestamp to test | |
$now | int Current timestamp | |
Résultat | boolean |
public setThirdPartyCookie ( $idVisitor ) |