isKnownReferrer method

bool isKnownReferrer()

Is current install from known partner

Implementation

bool isKnownReferrer() {
  try {
    final data = getReferrerFields();
    if (Platform.isIOS) {
      if (data.containsKey('partner')) return true;
      return false;
    }

    if ((data['gclid'] ?? '').isNotEmpty) return true;
    final utmSource = data['utm_source'] ?? '';
    if (_ourReferrerPattern.hasMatch(utmSource)) return true;
    if (utmSource.contains('apps.facebook.com') || utmSource.contains('apps.instagram.com')) return true;
    if (adjustExternalClickId.isNotEmpty) return true;

    return false;
  } catch (e, stack) {
    Fimber.e('$e', stacktrace: stack);
    return false;
  }
}