I have an issue regarding the populating of “Your Properties”, I cant populate my mixpanel with any ekstra properties, not even test data, what am I doing wrong ?
Here is my component, the Event shows up correctly but not with any of my properties, only mixpanels own defaults properties show up
import React from 'react';
import { useNavigation } from '@react-navigation/native';
import Mixpanel from 'react-native-mixpanel';
const withEventTracking = (WrappedComponent, eventProps = {}, userEmail) => {
return (props) => {
const navigation = useNavigation();
const currentScreen = navigation.getState().routes[navigation.getState().index].name;
const trackEvent = () => {
console.log(`Tracking event for user: ${userEmail}`); // Log the user email
Mixpanel.track("Test Event", {
screen: currentScreen,
button: props.title || props.accessibilityLabel || 'Unnamed Button',
userEmail: userEmail,
exampleProperty: "testValue",
...eventProps,
...props.eventProps,
});
if (props.onPress) {
props.onPress();
}
};
return <WrappedComponent {...props} onPress={trackEvent} />;
};
};
export default withEventTracking;