PHP Интерфейс Ipunkt\LaravelAnalytics\Contracts\AnalyticsProviderInterface

Показать файл Открыть проект

Открытые методы

Метод Описание
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