Skip to content

Instantly share code, notes, and snippets.

@hayanisaid
Created May 6, 2021 21:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hayanisaid/00c8631305609a27731c7db47cd5f61a to your computer and use it in GitHub Desktop.
Save hayanisaid/00c8631305609a27731c7db47cd5f61a to your computer and use it in GitHub Desktop.
import Analytics from '@react-native-firebase/analytics';
import {View,Text, TouchableOpacity, TouchableHighlight} from 'react-native';
import Analytics from 'appcenter-analytics';
export default App(){
const __OnBuyButtonPressed= async()=>{
await Analytics().logEvent('Purchase', { price: '9.99', type: 'cloth' });
}
return(
<View>
<TouchableHighlight onPress={__OnBuyButtonPressed}>
<View
style={{
flexDirection: "row",
justifyContent: "space-around"
}}
>
<Text style={styles.signInButtonTextStyle}>Continue</Text>
</View>
</TouchableHighlight>
</View>
)}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment