public void LogEvents() { // Assemble and register your BaseBatch var batch = new BaseBatch(); batch.Environment = Batch.EnvironmentEnum.Development; batch.UserIdentities = new BatchUserIdentities() { CustomerId = "1234", Email = "*****@*****.**" }; MParticle.Instance.BaseBatch = batch; // Create your events var customAttributes = new Dictionary <string, string>(); customAttributes["foo"] = "bar"; var customEvent = new CustomEvent("foo event", CustomEvent.CustomEventTypeEnum.Location); var screenEvent = new ScreenViewEvent("foo screen"); // Log events MParticle.Instance.LogEvent(customEvent); MParticle.Instance.LogEvent(screenEvent); //(optional) Force an immediate upload (before the UploadInterval is finished, this will restart the UploadInterval) MParticle.Instance.Upload(); }
public void SyncBatchExmple() { // Assemble your Batch var batch = new Batch(); batch.Environment = Batch.EnvironmentEnum.Development; batch.UserIdentities = new BatchUserIdentities() { CustomerId = "1234", Email = "*****@*****.**" }; // Create your events and add to Batch var customAttributes = new Dictionary <string, string>(); customAttributes["foo"] = "bar"; var customEvent = new CustomEvent("foo event", CustomEvent.CustomEventTypeEnum.Location); batch.Events.Add(customEvent); var screenEvent = new ScreenViewEvent("foo screen"); batch.Events.Add(screenEvent); // Either // 1) Perform a single upload var batchResult = MParticle.Instance.UploadBatch(batch); // 2) Perform a bulk upload var bulk = new Collection <Batch>(); bulk.Add(batch); var bulkBatchResult = MParticle.Instance.BulkUploadBatches(bulk); }
public void TrackScreenView(string viewName) { if (!ReportingAnalytics) { return; } var e = new ScreenViewEvent(viewName); e.Track(); }
public void ScreenEvent() { var screenViewEvent = new ScreenViewEvent("foo screen"); }
public void TrackScreenView(string viewName) { if (!ReportingAnalytics) return; var e = new ScreenViewEvent(viewName); e.Track(); }