GoogleAnalyticsAction
in package
implements
GoogleAnalyticsActionInterface
Class GoogleAnalyticsAction
Interfaces, Classes and Traits
- GoogleAnalyticsActionInterface
- Interface GoogleAnalyticsActionInterface
Table of Contents
- $affiliation : string
- $currency : string
- $items : GoogleAnalyticsProductCollection
- $shippingCost : float
- $tax : float
- $transactionId : string
- $value : float
- affiliation() : string
- Returns the store or affiliation from which this transaction occurred.
- create() : GoogleAnalyticsAction
- Named constructor of GoogleAnalyticsAction.
- currency() : string
- Returns the currency value.
- items() : GoogleAnalyticsProductCollection
- Returns the associated products.
- shippingCost() : float
- Returns the shipping cost.
- tax() : float
- Returns the tax amount.
- transactionId() : string
- Returns the Unique ID for the transaction.
- value() : float
- Returns the value associated with the event.
- __construct() : mixed
- GoogleAnalyticsAction constructor.
Properties
$affiliation
protected
string
$affiliation
$currency
protected
string
$currency
$items
protected
GoogleAnalyticsProductCollection
$items
$shippingCost
protected
float
$shippingCost
$tax
protected
float
$tax
$transactionId
protected
string
$transactionId
$value
protected
float
$value
Methods
affiliation()
Returns the store or affiliation from which this transaction occurred.
public
affiliation() : string
Return values
string —The store or affiliation from which this transaction occurred.
create()
Named constructor of GoogleAnalyticsAction.
public
static create(string $transactionId, string $affiliation, float $value, string $currency, float $tax, float $shippingCost, GoogleAnalyticsProductCollection $items) : GoogleAnalyticsAction
Parameters
- $transactionId : string
-
Unique ID for the transaction.
- $affiliation : string
-
The affiliation from which this transaction occurred.
- $value : float
-
Value (i.e. revenue) associated with the event.
- $currency : string
-
Currency value (i.e. USD or EUR).
- $tax : float
-
Tax amount.
- $shippingCost : float
-
Shipping cost.
- $items : GoogleAnalyticsProductCollection
-
The associated products.
Return values
GoogleAnalyticsAction —New instance.
currency()
Returns the currency value.
public
currency() : string
Return values
string —Currency value (i.e. USD or EUR).
items()
Returns the associated products.
public
items() : GoogleAnalyticsProductCollection
Return values
GoogleAnalyticsProductCollection —The associated products.
shippingCost()
Returns the shipping cost.
public
shippingCost() : float
Return values
float —Shipping cost.
tax()
Returns the tax amount.
public
tax() : float
Return values
float —Tax amount.
transactionId()
Returns the Unique ID for the transaction.
public
transactionId() : string
Return values
string —Unique ID for the transaction.
value()
Returns the value associated with the event.
public
value() : float
Return values
float —Value (i.e. revenue) associated with the event.
__construct()
GoogleAnalyticsAction constructor.
protected
__construct(NonEmptyStringType $transactionId, NonEmptyStringType $affiliation, DecimalType $value, CurrencyCode $currency, DecimalType $tax, DecimalType $shippingCost, GoogleAnalyticsProductCollection $items) : mixed
Protected to enforce usage of named constructor.
Parameters
- $transactionId : NonEmptyStringType
-
Unique ID for the transaction.
- $affiliation : NonEmptyStringType
-
The store from which this transaction occurred.
- $value : DecimalType
-
Value (i.e. revenue) associated with the event.
- $currency : CurrencyCode
-
Currency value (i.e. USD or EUR).
- $tax : DecimalType
-
Tax amount.
- $shippingCost : DecimalType
-
Shipping cost.
- $items : GoogleAnalyticsProductCollection
-
The associated products.