trackPageViewCheck static method

Future<bool> trackPageViewCheck(
  1. dynamic p
)

Implementation

static Future<bool> trackPageViewCheck(var p) async {
  try {
    if ((p is Map) == false) {
      MzanalyticsLog.p('传入参数必须为Map类型');
      return false;
    }

    if ((p['dt'] is String) == false) {
      MzanalyticsLog.p('dt 必须为String类型');
      return false;
    }

    if (p['CustomDimMetrics'] is Map) {
      bool ret = await cdmCheck(p['CustomDimMetrics']);

      return ret;
    }

    return true;
  } catch (e) {
    return false;
  }
}