Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions components/GlobalErrorFallback.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { track } from "@/shared-libs/utils/analytics";
import useBreakpoints from "@/shared-libs/utils/use-breakpoints";
import Colors from "@/shared-uis/constants/Colors";
import { MaterialCommunityIcons } from "@expo/vector-icons";
Expand Down Expand Up @@ -43,6 +44,15 @@ function GlobalErrorFallbackContent({
);

const handleContactSupport = () => {
// intent "error", not "upgrade": this is someone whose app just broke.
// It belongs on the same event so support reach-outs are countable in
// one place, and on a distinct intent so it never inflates the
// monetisation funnel.
track("support_contact_clicked", {
channel: "email",
source: "error_fallback",
intent: "error",
});
Linking.openURL(`mailto:${SUPPORT_EMAIL}`).catch(() => { });
};

Expand Down
9 changes: 9 additions & 0 deletions components/ProfileModal/Profile-Modal.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { IS_MONETIZATION_DONE } from "@/shared-constants/app";
import { ISocials } from "@/shared-libs/firestore/trendly-pro/models/socials";
import { IUsers } from "@/shared-libs/firestore/trendly-pro/models/users";
import { track } from "@/shared-libs/utils/analytics";
import { Console } from "@/shared-libs/utils/console";
import { useMyNavigation } from "@/shared-libs/utils/router";
import useBreakpoints from "@/shared-libs/utils/use-breakpoints";
Expand Down Expand Up @@ -170,6 +171,14 @@ const ProfileBottomSheet: React.FC<ProfileBottomSheetProps> = ({
description:
"You can only get the access to influencers social media after you subscribe to a paid plan",
confirmAction: () => {
// shared-uis cannot reach the host app's goToBilling() helper,
// so this fires the same rung-2 event directly. Kept in sync by
// the UpgradeSource union rather than by convention.
track("upgrade_cta_clicked", {
source: "profile_modal",
feature: "influencer_socials",
reason: "plan_locked",
});
router.push("/billing");
},
confirmText: "Upgrade now",
Expand Down