PHP 클래스 TheIconic\Tracking\GoogleAnalytics\Analytics

The main interface for the clients, it relies heavily in magic methods exposing an interface with method tags. ==== GETTERS ==== General
파일 보기 프로젝트 열기: theiconic/php-ga-measurement-protocol 1 사용 예제들

공개 메소드들

메소드 설명
__call ( $methodName, array $methodArguments ) : mixed Routes the method call to the adequate private method.
__construct ( boolean $isSsl = false ) When passed with an argument of TRUE, it will send the hit using HTTPS instead of plain HTTP.
getUrl ( ) : string Build and returns URL used to send to Google Analytics.
makeNonBlocking ( ) Makes the request to GA asynchronous (non-blocking).
setAsyncRequest ( boolean $isAsyncRequest ) Sets a request to be either synchronous or asynchronous (non-blocking).
setDebug ( boolean $value ) : Analytics Sets debug mode to true or false.
setHttpClient ( HttpClient $httpClient ) Sets the HttpClient.

비공개 메소드들

메소드 설명
addItem ( $methodName, array $methodArguments ) Adds an item to a compund parameter collection.
fixTypos ( string $methodName ) : string Fix typos that went into releases, this way we ensure we don't break scripts in production.
getEndpoint ( ) : string Gets the full endpoint to GA.
getFullParameterClass ( $parameterClass, $methodName ) : string Gets the fully qualified name for a parameter.
getHttpClient ( ) : HttpClient Gets the HttpClient.
getIndexFromArguments ( $methodArguments ) : string Gets the index value from the arguments.
getParameter ( $methodName, array $methodArguments ) : string Gets the value for a parameter.
getParameterClassConstant ( $constant, $exceptionMsg ) : mixed Gets a contant from a class dynamically.
hasMinimumRequiredParameters ( ) : boolean Validates the minimum required parameters for every GA hit are being sent.
sendHit ( $methodName ) : AnalyticsResponse Sends a hit to GA. The hit will contain in the payload all the parameters added before.
setParameter ( $methodName, array $methodArguments ) Sets the value for a parameter.
setParameterActionTo ( $parameter, $action ) Sets a parameter action to the value specified by the method call.

메소드 상세

__call() 공개 메소드

Routes the method call to the adequate private method.
public __call ( $methodName, array $methodArguments ) : mixed
$methodName
$methodArguments array
리턴 mixed

__construct() 공개 메소드

It parses the available parameters.
public __construct ( boolean $isSsl = false )
$isSsl boolean

getUrl() 공개 메소드

Build and returns URL used to send to Google Analytics.
public getUrl ( ) : string
리턴 string

makeNonBlocking() 공개 메소드

Makes the request to GA asynchronous (non-blocking).
사용 중단: Use setAsyncRequest(boolean $isAsyncRequest) instead. To be removed in next major version.
public makeNonBlocking ( )

setAsyncRequest() 공개 메소드

Sets a request to be either synchronous or asynchronous (non-blocking).
public setAsyncRequest ( boolean $isAsyncRequest )
$isAsyncRequest boolean

setDebug() 공개 메소드

Sets debug mode to true or false.
public setDebug ( boolean $value ) : Analytics
$value boolean
리턴 Analytics

setHttpClient() 공개 메소드

Sets the HttpClient.
public setHttpClient ( HttpClient $httpClient )
$httpClient TheIconic\Tracking\GoogleAnalytics\Network\HttpClient