How to use the @segment/analytics-react-native.alias 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 / 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 / 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'
  })
}