<commit_before>import { Analytics } from "@segment/analytics-react-native"
import { Platform } from "react-native"
import Config from "react-native-config"
import { isCohesionScreen, TrackingProvider } from "./providers"

let analytics: Analytics.Client
export const SegmentTrackingProvider: TrackingProvider = {
  setup: () => {
    analytics = require("@segment/analytics-react-native").default

    analytics
      .setup(Config.SEGMENT_STAGING_WRITE_KEY_ANDROID, {})
      // trackAppLifecycleEvents: true,
      .then(() => console.log("Analytics is ready"))
      .catch((err) => console.error("Something went wrong", err))
  },

  identify: (userId, traits) => {
    // temporary guard
    if (Platform.OS !== "android") {
      return
    }

    analytics.identify(userId, traits)
  },

  postEvent: (info) => {<commit_msg>send to prod one (#4849)<commit_after>import { Analytics } from "@segment/analytics-react-native"
import { Platform } from "react-native"
import Config from "react-native-config"
import { isCohesionScreen, TrackingProvider } from "./providers"

let analytics: Analytics.Client
export const SegmentTrackingProvider: TrackingProvider = {
  setup: () => {
    analytics = require("@segment/analytics-react-native").default

    analytics
      .setup(__DEV__ ? Config.SEGMENT_STAGING_WRITE_KEY_ANDROID : Config.SEGMENT_PRODUCTION_WRITE_KEY_ANDROID, {})
      // trackAppLifecycleEvents: true,
      .then(() => console.log("Analytics is ready"))
      .catch((err) => console.error("Something went wrong", err))
  },

  identify: (userId, traits) => {
    // temporary guard
    if (Platform.OS !== "android") {
      return
    }

    analytics.identify(userId, traits)
  },

  postEvent: (info) => {
{'fraction_non_alphanumeric': 0.13880855986119145, 'fraction_numerical': 0.002313475997686524, 'mean_word_length': 3.8870056497175143, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '406227', 'n_tokens_mistral': 526, 'n_tokens_neox': 522, 'n_words': 112}