diff --git a/App.js b/App.js index 7c539b9..dd93a93 100644 --- a/App.js +++ b/App.js @@ -29,6 +29,7 @@ import NewGroup from './Views/NewGroup.js'; import Slideshow from './Views/Slideshow.js'; import SongPlayer from './Views/SongPlayer.js'; import { Platform } from 'react-native'; +import { PostHogProvider } from 'posthog-react-native' const Tab = createBottomTabNavigator(); @@ -260,75 +261,77 @@ export default function App() { }} theme={theme}> - - { - return ( - - {props.navigation.canGoBack() ? { - props.navigation.goBack(); - }} /> : { props.navigation.navigate('Menu'); }} />} - - { - alert("Chats are comming soon."); - }} onLongPress={()=>{ - props.navigation.navigate("SongPlayer"); - }} /> - { props.navigation.navigate("Search") }} /> - { props.navigation.navigate("Notifications") }} /> - - ) - }, - }}> - - - - - - - - - - + + { + return ( + + {props.navigation.canGoBack() ? { + props.navigation.goBack(); + }} /> : { props.navigation.navigate('Menu'); }} />} + + { + alert("Chats are comming soon."); + }} onLongPress={() => { + props.navigation.navigate("SongPlayer"); + }} /> + { props.navigation.navigate("Search") }} /> + { props.navigation.navigate("Notifications") }} /> + + ) + }, + }}> + + + + + + + + + + - - - - - + /> + + + + + + diff --git a/Views/Feed.js b/Views/Feed.js index adbe0d4..f050cf5 100644 --- a/Views/Feed.js +++ b/Views/Feed.js @@ -78,9 +78,11 @@ let Feed = ({ navigation, route }) => { API.getMe().then((me) => { if (subscribed){ GlobalState.me = me; - posthog.identify(me._id, + posthog.identify(me.userid, { - name: me.profile.firstName + name: me.profile.firstName, + profileid: me._id, + is_superuser: me.superuser, } ); posthog.capture('login'); @@ -98,7 +100,6 @@ let Feed = ({ navigation, route }) => { storeFeed(posts); } console.log("Feed, end useEffect") - posthog.capture('feed_impression'); } getData() return () => { @@ -106,13 +107,6 @@ let Feed = ({ navigation, route }) => { } }, [route.params]); const renderPost = (({ item }) => { - posthog.capture( - 'feed_impression', - { - post_id: item._id, - post_type: item.type, - } - ); if (item.nonOrganicType === 'PopularUsers' || item.nonOrganicType === 'PopularGroups'){ if(item.nonOrganicType === 'PopularUsers'){ return ()