PHP 클래스 kartik\social\GoogleAnalytics

Usage: echo GoogleAnalytics::widget([ 'id' => 'TRACKING_ID', 'domain' => 'TRACKING_DOMAIN' ]);
부터: 1.0
저자: Kartik Visweswaran ([email protected])
상속: extends Widget
파일 보기 프로젝트 열기: kartik-v/yii2-social 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$anonymizeIp the settings to anonymize the IP address of the hit (http request) sent to Google Analytics. One of the following values are supported: - 0 or GoogleAnalytics::HIT_NONE: The IP will not be anonymized. - 1 or GoogleAnalytics::HIT_ALL: Anonymize the IP addresses for all the hits sent from a page (the lifetime of the tracker object) - 2 or GoogleAnalytics::HIT_EACH: Anonymize the IP address of an individual hit
$domain the domain name of your website where the tracking code will be displayed
$id the Google Analytics Tracking ID
$jsAfterSend any javascript to append after the script that sends data
$jsBeforeSend any javascript to prepend before the script that sends data
$objectName the global object name. Defaults to __gaTracker.
$sendConfig the configuration for sending data. Set it as a string (to be used as is) or an associative array of $key => $value.
$testMode whether to enable test mode to automatically set cookieDomain. The test mode will auto default to YII_DEBUG definition.
$trackerConfig the tracker object configuration. Set it as a string (to be used as is) or an associative array of $key => $value.

공개 메소드들

메소드 설명
init ( ) Initialize the widget

메소드 상세

init() 공개 메소드

Initialize the widget
public init ( )

프로퍼티 상세

$anonymizeIp 공개적으로 프로퍼티

the settings to anonymize the IP address of the hit (http request) sent to Google Analytics. One of the following values are supported: - 0 or GoogleAnalytics::HIT_NONE: The IP will not be anonymized. - 1 or GoogleAnalytics::HIT_ALL: Anonymize the IP addresses for all the hits sent from a page (the lifetime of the tracker object) - 2 or GoogleAnalytics::HIT_EACH: Anonymize the IP address of an individual hit
public $anonymizeIp

$domain 공개적으로 프로퍼티

the domain name of your website where the tracking code will be displayed
public $domain

$id 공개적으로 프로퍼티

the Google Analytics Tracking ID
public $id

$jsAfterSend 공개적으로 프로퍼티

any javascript to append after the script that sends data
public $jsAfterSend

$jsBeforeSend 공개적으로 프로퍼티

any javascript to prepend before the script that sends data
public $jsBeforeSend

$objectName 공개적으로 프로퍼티

the global object name. Defaults to __gaTracker.
public $objectName

$sendConfig 공개적으로 프로퍼티

the configuration for sending data. Set it as a string (to be used as is) or an associative array of $key => $value.
또한 보기: https://developers.google.com/analytics/devguides/collection/analyticsjs/advanced#send
public $sendConfig

$testMode 공개적으로 프로퍼티

whether to enable test mode to automatically set cookieDomain. The test mode will auto default to YII_DEBUG definition.
public $testMode

$trackerConfig 공개적으로 프로퍼티

the tracker object configuration. Set it as a string (to be used as is) or an associative array of $key => $value.
또한 보기: https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#create
public $trackerConfig