WT 1.1.22 reengineering: Training Plan execution, registration
This commit is contained in:
@@ -57,6 +57,7 @@ enum TrackingEvent {
|
||||
training_plan_execute,
|
||||
training_plan_finished,
|
||||
training_plan_custom,
|
||||
trial
|
||||
}
|
||||
|
||||
T enumFromString<T>(Iterable<T> values, String value) {
|
||||
|
||||
@@ -46,7 +46,9 @@ class RevenueCatPurchases with Logging {
|
||||
log("Purchaserinfo not reachable " + e.toString());
|
||||
}
|
||||
}
|
||||
if (Cache().userLoggedIn!.admin == 1) {
|
||||
bool inTrial = Cache().userLoggedIn!.trialDate != null && DateTime.now().difference(Cache().userLoggedIn!.trialDate!).inDays < 10;
|
||||
log("Trial mode: $inTrial date: ${Cache().userLoggedIn!.trialDate}");
|
||||
if (Cache().userLoggedIn!.admin == 1 || inTrial) {
|
||||
Cache().hasPurchased = true;
|
||||
}
|
||||
}
|
||||
|
||||
+2
-1
@@ -19,12 +19,13 @@ class Track with Logging {
|
||||
Track._internal();
|
||||
|
||||
void track(TrackingEvent event, {String eventValue = ""}) {
|
||||
analytics.logEvent(name: event.enumToString(), parameters: {"value": eventValue});
|
||||
if (!isInDebugMode) {
|
||||
FlurryData.logEvent(event.toString());
|
||||
// Smartlook.setGlobalEventProperty(event.toString(), eventValue, false);
|
||||
FlutterUxcam.logEventWithProperties(event.enumToString(), {"value": eventValue});
|
||||
model.Tracking tracking = model.Tracking();
|
||||
analytics.logEvent(name: event.enumToString(), parameters: {"value": eventValue});
|
||||
//analytics.logEvent(name: event.enumToString(), parameters: {"value": eventValue});
|
||||
tracking.customerId = Cache().userLoggedIn == null ? 0 : Cache().userLoggedIn!.customerId!;
|
||||
tracking.event = event.enumToString();
|
||||
if (eventValue.isNotEmpty) {
|
||||
|
||||
Reference in New Issue
Block a user