pushSetAnalytic method

dynamic pushSetAnalytic(
  1. String name,
  2. dynamic screenName,
  3. dynamic action
)

Implementation

pushSetAnalytic(String name, screenName, action) {
  if (name != '') {
    Map<String, Object> data = <String, Object>{
      'action': action,
      'mobile_type': Platform.isAndroid ? "android" : "ios",
    };


    //appflyer
    // List onlyAppFlyer = [
    //   "Product(Cars)",
    //   "Product(MeetUp)",
    //   "Product(Free)",
    //   "Product(MotorCycle)",
    //   "Product(protection)",
    //   "Product(protection)",
    //   "CommunityPost",
    //   "SignupGoogle",
    //   "SignupFacebook",
    //   "SignupApple",
    //   "SignupEmail",
    //   "SignupPhone",
    // ];

    // AppsflyerSdk appsflyerSdk = AppsflyerSdk(appsFlyerOptions);

    // onlyAppFlyer.forEach((element) {
    //   if (element == name) {
    //     if (name == "SignupFacebook" &&
    //         sellonConfig.Config.AppVersion == VersionApps.indonesia) {
    //       appsflyerSdk.logEvent(name, data).then((value) {});
    //     } else {
    //       appsflyerSdk.logEvent(name, data).then((value) {});
    //     }
    //   }
    // });

    // analytics.logScreenView(screenName: screenName);
    // analytics.logEvent(name: name, parameters: data);
  }
}