Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// })
// );
}
if (routeName === 'ExpandedAssetScreen') {
const { asset, type } = params;
paramsToTrack = {
assetContractAddress:
asset.address || get(asset, 'asset_contract.address'),
assetName: asset.name,
assetSymbol: asset.symbol || get(asset, 'asset_contract.symbol'),
assetType: type,
};
}
return analytics.screen(routeName, paramsToTrack);
}
}}
ref={ref}
onNavigationStateChange={(prevState, currentState) => {
const { params, routeName } = Navigation.getActiveRoute(currentState);
const prevRouteName = Navigation.getActiveRouteName(prevState);
// native stack rn does not support onTransitionEnd and onTransitionStart
if (
prevRouteName === 'ImportSeedPhraseSheet' &&
(routeName === 'ProfileScreen' || routeName === 'WalletScreen')
) {
StatusBar.setBarStyle('dark-content');
}
if (routeName === 'SettingsModal') {
let subRoute = get(params, 'section.title');
if (subRoute === 'Settings') subRoute = null;
return analytics.screen(
`${routeName}${subRoute ? `>${subRoute}` : ''}`
);
}
if (routeName !== prevRouteName) {
let paramsToTrack = null;
if (
prevRouteName === 'MainExchangeScreen' &&
routeName === 'WalletScreen'
) {
// store.dispatch(updateTransitionProps({ blurColor: null }));
} else if (
prevRouteName === 'WalletScreen' &&
routeName === 'MainExchangeScreen'
) {
margin: 20
},
text: {
color: '#FBFAF9'
},
container: {
flex: 1,
justifyContent: 'flex-start',
alignItems: 'center',
backgroundColor: '#32A75D'
}
})
import integrations from './integrations.gen'
analytics
.setup('SEGMENT_WRITE_TOKEN', {
debug: true,
using: integrations
})
.then(() => console.log('Analytics ready'))
.catch(err => console.error(err))
const logAnonymousId = async () => {
console.log('anonymousId: %s', await analytics.getAnonymousId())
}
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'
})
}
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'
})
}
const screenHome = () => analytics.screen('Home')
const screenHome = () => analytics.screen('Home')
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'
})
}
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'
})
}