public function addCommerceProductDetailView($analytics = null, $productVariant = null)
{
if ($productVariant) {
if ($analytics) {
$productData = $this->getProductDataFromProduct($productVariant);
// Don't forget to set the product action, in this case to DETAIL
$analytics->setProductActionToDetail();
//Add the product to the hit to be sent
$analytics->addProduct($productData);
InstantAnalyticsPlugin::log("addCommerceProductDetailView for `" . $productData['sku'] . "` - `" . $productData['name'] . "` - `" . $productData['name'] . "`", LogLevel::Info, false);
}
}
}