GoogleAnalyticsTrackingRepository
in package
Class GoogleAnalyticsTrackingRepository
Table of Contents
- $reader : GoogleAnalyticsTrackingRepositoryReader
- __construct() : mixed
- GoogleAnalyticsRepository constructor.
- fetchImpressionByProductId() : GoogleAnalyticsProductImpression
- Returns a product impression model by the provided id, language id and optional list name.
- fetchImpressionsByProductIds() : GoogleAnalyticsProductImpressionCollection
- Returns a product impression model by the provided product ids, language id and optional list name.
- fetchProductByCombinedId() : GoogleAnalyticsProduct
- Fetches products analytics data by the given combined product id.
- fetchProductByVariant() : GoogleAnalyticsProduct
- Fetches products analytics data by the given product id and variants data.
- fetchPurchaseByOrderId() : GoogleAnalyticsAction
- Fetches purchase information by the given order id.
Properties
$reader
protected
GoogleAnalyticsTrackingRepositoryReader
$reader
Methods
__construct()
GoogleAnalyticsRepository constructor.
public
__construct(GoogleAnalyticsTrackingRepositoryReader $reader) : mixed
Parameters
- $reader : GoogleAnalyticsTrackingRepositoryReader
Return values
mixed —fetchImpressionByProductId()
Returns a product impression model by the provided id, language id and optional list name.
public
fetchImpressionByProductId(IdType $productId, IdType $languageId, IdType $customerGroupId[, NonEmptyStringType|null $listName = null ]) : GoogleAnalyticsProductImpression
Parameters
- $productId : IdType
-
Product id.
- $languageId : IdType
-
Language id.
- $customerGroupId : IdType
-
Customer group Id.
- $listName : NonEmptyStringType|null = null
-
(Optional) List name.
Return values
GoogleAnalyticsProductImpression —Product impression model.
fetchImpressionsByProductIds()
Returns a product impression model by the provided product ids, language id and optional list name.
public
fetchImpressionsByProductIds(IdCollection $productIds, IdType $languageId, IdType $customerGroupId[, NonEmptyStringType|null $listName = null ]) : GoogleAnalyticsProductImpressionCollection
Parameters
- $productIds : IdCollection
-
Product ids.
- $languageId : IdType
-
Language id.
- $customerGroupId : IdType
-
Customer group Id.
- $listName : NonEmptyStringType|null = null
-
(Optional) List name.
Return values
GoogleAnalyticsProductImpressionCollection —Product impression collection.
fetchProductByCombinedId()
Fetches products analytics data by the given combined product id.
public
fetchProductByCombinedId(GoogleAnalyticsCombinedProductIdInterface $combinedProductId, IdType $languageId, IdType $customerGroupId[, DecimalType $quantity = null ]) : GoogleAnalyticsProduct
Parameters
- $combinedProductId : GoogleAnalyticsCombinedProductIdInterface
-
Combination of product id, including attributes and properties.
- $languageId : IdType
-
Language id.
- $customerGroupId : IdType
-
Customer group id.
- $quantity : DecimalType = null
-
Products quantity.
Return values
GoogleAnalyticsProduct —Google analytics product object.
fetchProductByVariant()
Fetches products analytics data by the given product id and variants data.
public
fetchProductByVariant(IdType $productId, IdType $languageId, IdType $customerGroupId, DecimalType $quantity, GoogleAnalyticsVariantInterface $variant) : GoogleAnalyticsProduct
Parameters
- $productId : IdType
-
Product Id.
- $languageId : IdType
-
Language Id.
- $customerGroupId : IdType
-
Customer group Id.
- $quantity : DecimalType
-
Products quantity.
- $variant : GoogleAnalyticsVariantInterface
-
Variants information.
Return values
GoogleAnalyticsProduct —Google analytics product object.
fetchPurchaseByOrderId()
Fetches purchase information by the given order id.
public
fetchPurchaseByOrderId(IdType $orderId) : GoogleAnalyticsAction
Parameters
- $orderId : IdType
-
Order Id.
Return values
GoogleAnalyticsAction —Google analytics purchase action.