public ActionTrackingAttribute(string trackingAccount, string trackingDomain, string actionDescription, string actionUrl)
        {
            try
            {
                if (string.IsNullOrEmpty(trackingDomain) && System.Web.HttpContext.Current != null)
                {
                    trackingDomain = System.Web.HttpContext.Current.Request.Url.Host;
                }
            }
            catch { /* intended */ }

            Tracker = new Tracker(trackingAccount, trackingDomain, new CookieBasedAnalyticsSession(), new AspNetMvc5TrackerEnvironment());
            ActionDescription = actionDescription;
            ActionUrl = actionUrl;
        }
 public static void RegisterGlobalFilter(Tracker tracker)
 {
     GlobalFilters.Filters.Add(new ActionTrackingAttribute(tracker));
 }
 public ActionTrackingAttribute(string trackingAccount, string trackingDomain, Func<ActionDescriptor, bool> isTrackableAction)
 {
     Tracker = new Tracker(trackingAccount, trackingDomain, new CookieBasedAnalyticsSession(), new AspNetMvc5TrackerEnvironment());
     IsTrackableAction = isTrackableAction;
 }
 public ActionTrackingAttribute(Tracker tracker, Func<ActionDescriptor, bool> isTrackableAction)
 {
     Tracker = tracker;
     IsTrackableAction = isTrackableAction;
 }
 public ActionTrackingAttribute(Tracker tracker)
     : this(tracker, action => true)
 {
 }