PHP Class Craft\InstantAnalyticsTwigExtension

Inheritance: extends Twig_Extension
Datei anzeigen Open project: nystudio107/instantanalytics

Public Methods

Method Description
analytics ( ) Return an Analytics object
eventAnalytics ( $eventCategory = "", $eventAction = "", $eventLabel = "", $eventValue ) : Analytics Get an Event analytics object
eventTrackingUrl ( string $url, string $eventCategory = "", string $eventAction = "", string $eventLabel = "", string $eventValue ) : string Get an Event tracking URL
getFilters ( ) : array
getFunctions ( ) : array
getGlobals ( ) : array
getName ( ) : string
pageViewAnalytics ( $url = "", $title = "" ) : Analytics Get a PageView analytics object
pageViewTrackingUrl ( string $url, string $title ) : string Get a PageView tracking URL

Private Methods

Method Description
_get_current_template_path ( ) : string Get the current template path

Method Details

analytics() public method

Return an Analytics object
public analytics ( )

eventAnalytics() public method

Get an Event analytics object
public eventAnalytics ( $eventCategory = "", $eventAction = "", $eventLabel = "", $eventValue ) : Analytics
return Analytics object

eventTrackingUrl() public method

Get an Event tracking URL
public eventTrackingUrl ( string $url, string $eventCategory = "", string $eventAction = "", string $eventLabel = "", string $eventValue ) : string
$url string the URL to track
$eventCategory string the event category
$eventAction string the event action
$eventLabel string the event label
$eventValue string the event value
return string the tracking URL

getFilters() public method

public getFilters ( ) : array
return array

getFunctions() public method

public getFunctions ( ) : array
return array

getGlobals() public method

public getGlobals ( ) : array
return array

getName() public method

public getName ( ) : string
return string The extension name

pageViewAnalytics() public method

Get a PageView analytics object
public pageViewAnalytics ( $url = "", $title = "" ) : Analytics
return Analytics object

pageViewTrackingUrl() public method

Get a PageView tracking URL
public pageViewTrackingUrl ( string $url, string $title ) : string
$url string the URL to track
$title string the page title
return string the tracking URL