public override string RenderCommand() { var sb = new StringBuilder(); var ccfg = new ConfigurationObject(_checkoutAction.Info); sb.AppendFormat("ga('ec:setAction', 'checkout_option', {0});", ccfg.Render()); sb.AppendLine(); if (_trackingEvent != null) { sb.Append(_trackingEvent.RenderCommand()); } return(sb.ToString()); }
public override string RenderCommand() { var sb = new StringBuilder(); var lcfg = new ConfigurationObject(_product.Info); sb.AppendFormat("ga('ec:addProduct', {0});", lcfg.Render()); sb.AppendLine(); sb.AppendLine("ga('ec:setAction', 'add');"); if (_trackingEvent != null) { sb.Append(_trackingEvent.RenderCommand()); } return(sb.ToString()); }
public override string RenderCommand() { var sb = new StringBuilder(); var pcfg = new ConfigurationObject(_product.Info); sb.AppendFormat("ga('ec:addProduct', {0});", pcfg.Render()); sb.AppendLine(); var ccfg = new ConfigurationObject(_clickAction.Info); sb.AppendFormat("ga('ec:setAction', 'click', {0});", ccfg.Render()); sb.AppendLine(); if (_trackingEvent != null) sb.Append(_trackingEvent.RenderCommand()); return sb.ToString(); }
public override string RenderCommand() { var sb = new StringBuilder(); foreach (var impression in _impressions) { var icfg = new ConfigurationObject(impression.Info); sb.AppendFormat("ga('ec:addImpression', {0});", icfg.Render()); sb.AppendLine(); } if (_trackingEvent != null) { sb.Append(_trackingEvent.RenderCommand()); } return(sb.ToString()); }