How to use the @segment/analytics-react-native.identify function in @segment/analytics-react-native

To help you get started, we’ve selected a few @segment/analytics-react-native examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github segmentio / analytics-react-native / packages / test-app / seed / App.tsx View on Github external
const trackOrder = () => {
  analytics.track('Order Completed')
  analytics.track('Order Cancelled', {
    order_id: 323
  })
  analytics.identify('userIdOnly')
  analytics.identify('userId', {
    age: 32
  })
  analytics.alias('newlyAliasedId')
  analytics.screen('User Login Screen', {
    method: 'google'
  })
}
github segmentio / analytics-react-native / packages / test-app / seed / App.tsx View on Github external
const trackOrder = () => {
  analytics.track('Order Completed')
  analytics.track('Order Cancelled', {
    order_id: 323
  })
  analytics.identify('userIdOnly')
  analytics.identify('userId', {
    age: 32
  })
  analytics.alias('newlyAliasedId')
  analytics.screen('User Login Screen', {
    method: 'google'
  })
}
github segmentio / analytics-react-native / packages / test-app / App.js View on Github external
const trackOrder = () => {
	analytics.track('Order Completed')
	analytics.track('Order Cancelled', {
		order_id: 323
	})
	analytics.identify('userIdOnly')
	analytics.identify('userId', {
		age: 32
	})
	analytics.alias('newlyAliasedId')
	analytics.screen('User Login Screen', {
		method: 'google'
	})
}
github segmentio / analytics-react-native / packages / test-app / App.js View on Github external
const trackOrder = () => {
	analytics.track('Order Completed')
	analytics.track('Order Cancelled', {
		order_id: 323
	})
	analytics.identify('userIdOnly')
	analytics.identify('userId', {
		age: 32
	})
	analytics.alias('newlyAliasedId')
	analytics.screen('User Login Screen', {
		method: 'google'
	})
}
github LedgerHQ / ledger-live-mobile / src / analytics / segment.js View on Github external
collectDeviceId: false,
      },
      ios: {
        trackAdvertising: false,
        trackDeepLinks: false,
      },
    });
  }

  const { user, created } = await getOrCreateUser();
  storeInstance = store;
  if (created) {
    if (ANALYTICS_LOGS) console.log("analytics:identify", user.id);
    if (token) {
      await analytics.reset();
      await analytics.identify(user.id, extraProperties(store));
    }
  }
  track("Start", extraProperties(store), true);
};
github rainbow-me / rainbow / src / App.js View on Github external
handleInitializeAnalytics = async () => {
    const storedIdentifier = await keychain.loadString('analyticsUserIdentifier');

    if (!storedIdentifier) {
      const identifier = await RNIOS11DeviceCheck.getToken()
        .then((deviceId) => deviceId)
        .catch(() => nanoid());
      await keychain.saveString('analyticsUserIdentifier', identifier);
      analytics.identify(identifier);
    }

    await analytics.setup(REACT_APP_SEGMENT_API_WRITE_KEY, {
      ios: {
        trackDeepLinks: true,
      },
      trackAppLifecycleEvents: true,
      trackAttributionData: true,
    });
  }