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 AspNetWebApiTrackerEnvironment());
            ActionDescription = actionDescription;
            ActionUrl = actionUrl;
        }
 public ActionTrackingAttribute(string trackingAccount, string trackingDomain, Func<HttpActionContext, bool> isTrackableAction)
 {
     Tracker = new Tracker(trackingAccount, trackingDomain, new CookieBasedAnalyticsSession(), new AspNetWebApiTrackerEnvironment());
     IsTrackableAction = isTrackableAction;
 }
 public ActionTrackingAttribute(Tracker tracker, Func<HttpActionContext, bool> isTrackableAction)
 {
     Tracker = tracker;
     IsTrackableAction = isTrackableAction;
 }
 public ActionTrackingAttribute(Tracker tracker)
     : this(tracker, action => true)
 {
 }
		public static void RegisterTracker(this HttpConfiguration configuration, Tracker tracker)
        {
			configuration.Filters.Add(new ActionTrackingAttribute(tracker));
		}
 /// <summary>
 ///     Initializes a new instance of the <see cref="EPiServerActionTrackingAttribute" /> class.
 /// </summary>
 /// <param name="tracker">The tracker.</param>
 /// <param name="isTrackableAction">The is trackable action.</param>
 public EPiServerActionTrackingAttribute(Tracker tracker, Func<HttpActionContext, bool> isTrackableAction)
 {
     this.Tracker = tracker;
     this.IsTrackableAction = isTrackableAction;
 }
 public static void RegisterTracker(this HttpConfiguration configuration, Tracker tracker)
 {
     configuration.Filters.Add(new ActionTrackingAttribute(tracker));
 }
 public ActionTrackingAttribute(string trackingAccount, string trackingDomain, Func <HttpActionContext, bool> isTrackableAction)
 {
     Tracker           = new Tracker(trackingAccount, trackingDomain, new CookieBasedAnalyticsSession(), new AspNetWebApiTrackerEnvironment());
     IsTrackableAction = isTrackableAction;
 }
 public ActionTrackingAttribute(Tracker tracker, Func <HttpActionContext, bool> isTrackableAction)
 {
     Tracker           = tracker;
     IsTrackableAction = isTrackableAction;
 }
 public ActionTrackingAttribute(Tracker tracker)
     : this(tracker, action => true)
 {
 }