Adding posthog navigation

This commit is contained in:
Adolfo Reyna
2025-02-06 23:16:37 -05:00
parent 602081bf98
commit 7cf6f99503
2 changed files with 75 additions and 78 deletions

View File

@@ -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 (<PostPopularUsers post={item}/>)