PHP Class Craft\IAnalytics

Inheritance: extends TheIconic\Tracking\GoogleAnalytics\Analytics
Datei anzeigen Open project: nystudio107/instantanalytics Class Usage Examples

Protected Properties

Property Type Description
$shouldSendAnalytics

Public Methods

Method Description
__construct ( boolean $isSsl = false ) Override __construct() to store whether or not we should be sending Analytics data
__toString ( ) : string Turn an empty value so the twig tags {{ }} can be used
addCommerceCheckoutStep ( $orderModel = null, $step = 1, $option = "" ) Add a checkout step to the Analytics object
addCommerceProductDetailView ( $productVariant = null ) Add a product detail view to the Analytics object
addCommerceProductImpression ( $productVariant = null, integer $index, $listName = "" ) Add a product impression to the Analytics object

Private Methods

Method Description
sendHit ( $methodName ) : AnalyticsResponse Override sendHit() so that we can prevent Analytics data from being sent

Method Details

__construct() public method

Override __construct() to store whether or not we should be sending Analytics data
public __construct ( boolean $isSsl = false )
$isSsl boolean

__toString() public method

Turn an empty value so the twig tags {{ }} can be used
public __toString ( ) : string
return string ""

addCommerceCheckoutStep() public method

Add a checkout step to the Analytics object
public addCommerceCheckoutStep ( $orderModel = null, $step = 1, $option = "" )

addCommerceProductDetailView() public method

Add a product detail view to the Analytics object
public addCommerceProductDetailView ( $productVariant = null )

addCommerceProductImpression() public method

Add a product impression to the Analytics object
public addCommerceProductImpression ( $productVariant = null, integer $index, $listName = "" )
$index integer Where the product appears in the list

Property Details

$shouldSendAnalytics protected_oe property

protected $shouldSendAnalytics