// GET: WineSKUContent public ActionResult Index(WineSKUContent currentContent) { WineSKUViewModel wineSkuViewModel = new WineSKUViewModel(currentContent); wineSkuViewModel.PriceViewModel = GetPriceModel(currentContent); TrackAnalytics(wineSkuViewModel); wineSkuViewModel.IsSellable = IsSellable(currentContent); return(View(wineSkuViewModel)); }
protected void TrackAnalytics(WineSKUViewModel wineSkuViewModel) { // Track GoogleAnalyticsTracking tracking = new GoogleAnalyticsTracking(ControllerContext.HttpContext); tracking.ClearInteractions(); // Track the main product view tracking.ProductAdd( wineSkuViewModel.CatalogContent.Code, wineSkuViewModel.CatalogContent.DisplayName, null, wineSkuViewModel.CatalogContent.Facet_Brand, null, null, 0, (double)wineSkuViewModel.CatalogContent.GetDefaultPriceAmount(_currentMarket.GetCurrentMarket()), 0 ); // TODO: Track related products as impressions // Track action as details view tracking.Action("detail"); }