PHP 인터페이스 Ipunkt\LaravelAnalytics\Contracts\AnalyticsProviderInterface

파일 보기 프로젝트 열기: ipunkt/laravel-analytics

공개 메소드들

메소드 설명
cspNonce ( ) : string | null returns the current Content Security Policy nonce
disableAutoTracking ( ) : Ipunkt\LaravelAnalytics\Contracts\AnalyticsProviderInterface disable auto tracking
disableDisplayFeatures ( ) : Ipunkt\LaravelAnalytics\Contracts\AnalyticsProviderInterface disable display features
disableEcommerceTracking ( ) : Ipunkt\LaravelAnalytics\Contracts\AnalyticsProviderInterface disable ecommerce tracking
disableScriptBlock ( ) do not render script block
ecommerceAddItem ( string $id, string $name, null | string $sku = null, null | string $category = null, null | float $price = null, null | integer $quantity = null ) : Ipunkt\LaravelAnalytics\Contracts\AnalyticsProviderInterface ecommerce tracking - add item
ecommerceAddTransaction ( string $id, null | string $affiliation = null, null | float $revenue = null, null | float $shipping = null, null | float $tax = null ) : Ipunkt\LaravelAnalytics\Contracts\AnalyticsProviderInterface ecommerce tracking - add transaction
enableAutoTracking ( ) : Ipunkt\LaravelAnalytics\Contracts\AnalyticsProviderInterface enable auto tracking
enableDisplayFeatures ( ) : Ipunkt\LaravelAnalytics\Contracts\AnalyticsProviderInterface enable display features
enableEcommerceTracking ( ) : Ipunkt\LaravelAnalytics\Contracts\AnalyticsProviderInterface enable ecommerce tracking
enableScriptBlock ( ) render script block
nonInteraction ( boolean | null $value = null ) : boolean | Ipunkt\LaravelAnalytics\Contracts\AnalyticsProviderInterface sets or gets nonInteraction
render ( ) : string returns the javascript code for embedding the analytics stuff
setCampaign ( Campaign $campaign ) : Ipunkt\LaravelAnalytics\Contracts\AnalyticsProviderInterface sets a campaign
setCustom ( string | array $dimension, null | string $value = null ) : Ipunkt\LaravelAnalytics\Contracts\AnalyticsProviderInterface sets custom dimensions
setUserId ( string $userId ) : Ipunkt\LaravelAnalytics\Contracts\AnalyticsProviderInterface sets an user id for user tracking
trackCustom ( string $customCode ) : void track any custom code
trackEvent ( string $category, string $action, null | string $label, null | integer $value ) : void track an event
trackMeasurementUrl ( string $metricName, mixed $metricValue, Event $event, Campaign $campaign, string | null $clientId = null, array $params = [] ) : string assembles an url for tracking measurement without javascript
trackPage ( null | string $page, null | string $title, null | string $hittype ) : void track an page view
unsetCampaign ( ) : Ipunkt\LaravelAnalytics\Contracts\AnalyticsProviderInterface unsets a possible given campaign
unsetUserId ( ) : Ipunkt\LaravelAnalytics\Contracts\AnalyticsProviderInterface unsets a possible given user id
withCSP ( ) : Ipunkt\LaravelAnalytics\Contracts\AnalyticsProviderInterface enables Content Security Polity and sets nonce
withoutCSP ( ) : Ipunkt\LaravelAnalytics\Contracts\AnalyticsProviderInterface disables Content Security Polity

메소드 상세

cspNonce() 공개 메소드

returns the current Content Security Policy nonce
public cspNonce ( ) : string | null
리턴 string | null

disableAutoTracking() 공개 메소드

disable auto tracking
public disableAutoTracking ( ) : Ipunkt\LaravelAnalytics\Contracts\AnalyticsProviderInterface
리턴 Ipunkt\LaravelAnalytics\Contracts\AnalyticsProviderInterface

disableDisplayFeatures() 공개 메소드

disable display features
public disableDisplayFeatures ( ) : Ipunkt\LaravelAnalytics\Contracts\AnalyticsProviderInterface
리턴 Ipunkt\LaravelAnalytics\Contracts\AnalyticsProviderInterface

disableEcommerceTracking() 공개 메소드

disable ecommerce tracking
public disableEcommerceTracking ( ) : Ipunkt\LaravelAnalytics\Contracts\AnalyticsProviderInterface
리턴 Ipunkt\LaravelAnalytics\Contracts\AnalyticsProviderInterface

disableScriptBlock() 공개 메소드

do not render script block
public disableScriptBlock ( )

ecommerceAddItem() 공개 메소드

ecommerce tracking - add item
public ecommerceAddItem ( string $id, string $name, null | string $sku = null, null | string $category = null, null | float $price = null, null | integer $quantity = null ) : Ipunkt\LaravelAnalytics\Contracts\AnalyticsProviderInterface
$id string
$name string
$sku null | string
$category null | string
$price null | float
$quantity null | integer
리턴 Ipunkt\LaravelAnalytics\Contracts\AnalyticsProviderInterface

ecommerceAddTransaction() 공개 메소드

ecommerce tracking - add transaction
public ecommerceAddTransaction ( string $id, null | string $affiliation = null, null | float $revenue = null, null | float $shipping = null, null | float $tax = null ) : Ipunkt\LaravelAnalytics\Contracts\AnalyticsProviderInterface
$id string
$affiliation null | string
$revenue null | float
$shipping null | float
$tax null | float
리턴 Ipunkt\LaravelAnalytics\Contracts\AnalyticsProviderInterface

enableAutoTracking() 공개 메소드

enable auto tracking
public enableAutoTracking ( ) : Ipunkt\LaravelAnalytics\Contracts\AnalyticsProviderInterface
리턴 Ipunkt\LaravelAnalytics\Contracts\AnalyticsProviderInterface

enableDisplayFeatures() 공개 메소드

enable display features
public enableDisplayFeatures ( ) : Ipunkt\LaravelAnalytics\Contracts\AnalyticsProviderInterface
리턴 Ipunkt\LaravelAnalytics\Contracts\AnalyticsProviderInterface

enableEcommerceTracking() 공개 메소드

enable ecommerce tracking
public enableEcommerceTracking ( ) : Ipunkt\LaravelAnalytics\Contracts\AnalyticsProviderInterface
리턴 Ipunkt\LaravelAnalytics\Contracts\AnalyticsProviderInterface

enableScriptBlock() 공개 메소드

render script block
public enableScriptBlock ( )

nonInteraction() 공개 메소드

setting: $this->nonInteraction(true)->render(); getting: if ($this->nonInteraction()) echo 'non-interaction set';
public nonInteraction ( boolean | null $value = null ) : boolean | Ipunkt\LaravelAnalytics\Contracts\AnalyticsProviderInterface
$value boolean | null
리턴 boolean | Ipunkt\LaravelAnalytics\Contracts\AnalyticsProviderInterface

render() 공개 메소드

returns the javascript code for embedding the analytics stuff
public render ( ) : string
리턴 string

setCampaign() 공개 메소드

sets a campaign
public setCampaign ( Campaign $campaign ) : Ipunkt\LaravelAnalytics\Contracts\AnalyticsProviderInterface
$campaign Ipunkt\LaravelAnalytics\Data\Campaign
리턴 Ipunkt\LaravelAnalytics\Contracts\AnalyticsProviderInterface

setCustom() 공개 메소드

sets custom dimensions
public setCustom ( string | array $dimension, null | string $value = null ) : Ipunkt\LaravelAnalytics\Contracts\AnalyticsProviderInterface
$dimension string | array
$value null | string
리턴 Ipunkt\LaravelAnalytics\Contracts\AnalyticsProviderInterface

setUserId() 공개 메소드

sets an user id for user tracking
또한 보기: https://developers.google.com/analytics/devguides/collection/analyticsjs/cookies-user-id
public setUserId ( string $userId ) : Ipunkt\LaravelAnalytics\Contracts\AnalyticsProviderInterface
$userId string
리턴 Ipunkt\LaravelAnalytics\Contracts\AnalyticsProviderInterface

trackCustom() 공개 메소드

track any custom code
public trackCustom ( string $customCode ) : void
$customCode string
리턴 void

trackEvent() 공개 메소드

track an event
public trackEvent ( string $category, string $action, null | string $label, null | integer $value ) : void
$category string
$action string
$label null | string
$value null | integer
리턴 void

trackMeasurementUrl() 공개 메소드

e.g. for tracking email open events within a newsletter
public trackMeasurementUrl ( string $metricName, mixed $metricValue, Event $event, Campaign $campaign, string | null $clientId = null, array $params = [] ) : string
$metricName string
$metricValue mixed
$event Ipunkt\LaravelAnalytics\Data\Event
$campaign Ipunkt\LaravelAnalytics\Data\Campaign
$clientId string | null
$params array
리턴 string

trackPage() 공개 메소드

track an page view
public trackPage ( null | string $page, null | string $title, null | string $hittype ) : void
$page null | string
$title null | string
$hittype null | string
리턴 void

unsetCampaign() 공개 메소드

unsets a possible given campaign
public unsetCampaign ( ) : Ipunkt\LaravelAnalytics\Contracts\AnalyticsProviderInterface
리턴 Ipunkt\LaravelAnalytics\Contracts\AnalyticsProviderInterface

unsetUserId() 공개 메소드

unsets a possible given user id
public unsetUserId ( ) : Ipunkt\LaravelAnalytics\Contracts\AnalyticsProviderInterface
리턴 Ipunkt\LaravelAnalytics\Contracts\AnalyticsProviderInterface

withCSP() 공개 메소드

enables Content Security Polity and sets nonce
public withCSP ( ) : Ipunkt\LaravelAnalytics\Contracts\AnalyticsProviderInterface
리턴 Ipunkt\LaravelAnalytics\Contracts\AnalyticsProviderInterface

withoutCSP() 공개 메소드

disables Content Security Polity
public withoutCSP ( ) : Ipunkt\LaravelAnalytics\Contracts\AnalyticsProviderInterface
리턴 Ipunkt\LaravelAnalytics\Contracts\AnalyticsProviderInterface