Closed rubensavio closed 9 months ago
hi @rubensavio , please make sure your test device has access to the internet and the project token is correct.
also please refer to the section Why aren't my events showing up?
in the FAQ: https://github.com/mixpanel/mixpanel-react-native#faq
If still not working, please contact our support. Thank you!
Been using mixpanel for few years now, most of my react native projects were running on mixpanel packages only. I just tried a simple app today implmenting mixpanel for a demo and the events are not pushed either that or dashboard is not displaying. Below is the simple app code.
import React, {Component} from 'react'; import { Mixpanel } from 'mixpanel-react-native';
const mixpanel = new Mixpanel("Project token"); mixpanel.init(); mixpanel.flush(); import {StyleSheet, TouchableOpacity, Text, View} from 'react-native';
class App extends Component { state = { count: 0, };
onPress = () => { mixpanel.track('First event') this.setState({ count: this.state.count + 1, }); };
render() { return (
} }
const styles = StyleSheet.create({ container: { flex: 1, justifyContent: 'center', alignItems: 'center', }, button: { alignItems: 'center', backgroundColor: '#DDDDDD', padding: 10, marginBottom: 10, }, });
export default App;
can you guys let me know if am missing something