phpDocumentor

GoogleAnalyticsTracking
in package
implements GoogleAnalyticsTrackingInterface

Class GoogleAnalyticsTracking

Interfaces, Classes and Traits

GoogleAnalyticsTrackingInterface
Interface GoogleAnalyticsTrackingInterface

Table of Contents

BOX_IMPRESSION  = 'box-impression'
Valid google analytic tracking types. Use on of the constants below for instantiation.
CHECKOUT  = 'checkout'
LISTING_IMPRESSION  = 'listing-impression'
PRODUCT_CLICK  = 'product-click'
PRODUCT_DETAILS  = 'product-details'
SHOPPING_CART  = 'shopping-cart'
$type  : string
$validTypes  : array<string|int, mixed>
boxImpression()  : static|GoogleAnalyticsTracking
Creates a box impression tracking instance.
checkout()  : static|GoogleAnalyticsTracking
Creates a shopping cart tracking instance.
create()  : static|GoogleAnalyticsTracking
Named constructor of GoogleAnalyticsTracking.
listImpression()  : static|GoogleAnalyticsTracking
Creates a list impression tracking instance.
productClicks()  : static|GoogleAnalyticsTracking
Creates a product click tracking instance.
productDetails()  : static|GoogleAnalyticsTracking
Creates a box product details instance.
shoppingCart()  : static|GoogleAnalyticsTracking
Creates a shopping cart tracking instance.
trackingType()  : string
Returns the string representation of the tracking type.
__construct()  : mixed
GoogleAnalyticsTracking constructor.

Constants

BOX_IMPRESSION

Valid google analytic tracking types. Use on of the constants below for instantiation.

public mixed BOX_IMPRESSION = 'box-impression'

Properties

$validTypes

protected static array<string|int, mixed> $validTypes = ['box-impression', 'listing-impression', 'product-click', 'product-details', 'shopping-cart', 'checkout']

Methods

trackingType()

Returns the string representation of the tracking type.

public trackingType() : string
Return values
string

__construct()

GoogleAnalyticsTracking constructor.

protected __construct(string $type) : mixed

Protected to enforce usage of named constructor.

Parameters
$type : string

Tracking type, use one of the constants.

Tags
throws
InvalidTrackingException

If invalid type was provided.

Return values
mixed

Search results