internal MixpanelService(IMixpanelOptions options, IPropertiesProvider defaultPropertiesProvider, ITimeProvider timeProvider, IEventTracker eventTracker) { _defaultPropertiesProvider = defaultPropertiesProvider; _tracker = eventTracker; _options = options; _timeProvider = timeProvider; }
private static IEventTracker GetTracker(IMixpanelOptions options, IEnumerable <IHttpWebRequestStrategy> requestDecorators) { var mixpanelHttp = new MixpanelHttp(requestDecorators); return(new WsMixpanelTracker(options.Token, mixpanelHttp, new TrackerOptions() { SetEventTime = true, ProxyUrl = options.Url })); }
private static IEventTracker GetTracker(IMixpanelOptions options) { if (!options.Enabled) { return(new NullEventTracker()); } var decoratorFactory = new RequestStrategyFactory { Timeout = options.Timeout, Credentials = options.Credentials, Proxy = options.Proxy, UserAgent = options.UserAgent }; return(GetTracker(options, decoratorFactory.GetStrategies())); }
internal MixpanelService(IMixpanelOptions options, IPropertiesProvider defaultPropertiesProvider, ITimeProvider timeProvider) : this(options, defaultPropertiesProvider, timeProvider, GetTracker(options)) { }
public MixpanelService(IMixpanelOptions options, IPropertiesProvider defaultPropertiesProvider) : this(options, defaultPropertiesProvider, new Clock(), GetTracker(options)) { }
public MixpanelService(IMixpanelOptions options) : this(options, new NullPropertiesProvider()) { }