From 2be3239855076640997e8e15654e355a4c3cf9e5 Mon Sep 17 00:00:00 2001 From: Aman Raj <113578582+huamanraj@users.noreply.github.com> Date: Tue, 16 Dec 2025 16:49:27 +0530 Subject: [PATCH 01/17] feat: posthog event tracting for analytics --- .../src/app/(main)/(landing)/pitch/page.tsx | 104 ++++-- .../src/app/(main)/(landing)/pricing/page.tsx | 1 + apps/web/src/app/layout.tsx | 3 +- apps/web/src/app/providers.tsx | 120 +++++- apps/web/src/components/dashboard/Sidebar.tsx | 55 ++- .../src/components/landing-sections/CTA.tsx | 73 ++-- .../src/components/landing-sections/Hero.tsx | 13 +- .../components/landing-sections/footer.tsx | 29 ++ .../components/landing-sections/navbar.tsx | 27 +- apps/web/src/components/login/SignInPage.tsx | 18 +- .../src/components/payment/PaymentFlow.tsx | 41 +++ apps/web/src/hooks/useAnalytics.ts | 259 +++++++++++++ apps/web/src/lib/analytics.ts | 348 ++++++++++++++++++ 13 files changed, 1027 insertions(+), 64 deletions(-) create mode 100644 apps/web/src/hooks/useAnalytics.ts create mode 100644 apps/web/src/lib/analytics.ts diff --git a/apps/web/src/app/(main)/(landing)/pitch/page.tsx b/apps/web/src/app/(main)/(landing)/pitch/page.tsx index 21b82b72..032949c5 100644 --- a/apps/web/src/app/(main)/(landing)/pitch/page.tsx +++ b/apps/web/src/app/(main)/(landing)/pitch/page.tsx @@ -106,7 +106,10 @@ const Pitch = () => { }} className="max-w-4xl mx-auto space-y-4" > -
@@ -134,7 +137,10 @@ const Pitch = () => { }} className="max-w-4xl mx-auto space-y-6" > -
@@ -190,7 +196,10 @@ const Pitch = () => { }} className="max-w-4xl mx-auto space-y-6" > -
@@ -258,13 +267,19 @@ const Pitch = () => { }} className="max-w-4xl mx-auto space-y-8" > -
- if i go with this approach, i'll have to sacrifice those
- fancy dreams of raising millions, being on the front
- page of magazines, having millions of users, etc.
+ if i go with this approach, i'll have to sacrifice
+ those fancy dreams of raising millions, being on the
+ front page of magazines, having millions of users, etc.
but the good part is i'll be able to stay genuine
@@ -341,7 +356,10 @@ const Pitch = () => {
{/* Philosophy #2 */}
@@ -425,7 +446,10 @@ const Pitch = () => { }} className="max-w-4xl mx-auto space-y-6" > -
@@ -496,7 +529,10 @@ const Pitch = () => {
@@ -572,7 +611,10 @@ const Pitch = () => {
@@ -599,7 +641,10 @@ const Pitch = () => {
@@ -611,7 +656,10 @@ const Pitch = () => {
@@ -633,7 +684,10 @@ const Pitch = () => {
@@ -649,7 +703,7 @@ const Pitch = () => {
@@ -715,6 +772,7 @@ const Pitch = () => { buttonText="Invest" buttonClassName="w-full max-w-md" callbackUrl={callbackUrl} + buttonLocation="pitch_page" /> ) : ( diff --git a/apps/web/src/app/(main)/(landing)/pricing/page.tsx b/apps/web/src/app/(main)/(landing)/pricing/page.tsx index ac4feb70..2a246bbd 100644 --- a/apps/web/src/app/(main)/(landing)/pricing/page.tsx +++ b/apps/web/src/app/(main)/(landing)/pricing/page.tsx @@ -428,6 +428,7 @@ const SecondaryPricingCard = ({ callbackUrl }: { callbackUrl: string }) => { planIdOk ? "" : "opacity-60 cursor-not-allowed" }`} callbackUrl={callbackUrl} + buttonLocation="pricing_page" />
- Topics Covered -
-+ Topics Covered +
++ Failed to load sessions. Please try again later. +
+ {sessionsErrorData && ( ++ {(sessionsErrorData as any)?.message || "Unknown error"} +
+ )} ++ No sessions available yet. +
++ Check back soon for new session recordings. +
+- {(sessionsErrorData as any)?.message || "Unknown error"} + {sessionsErrorData.message || "Unknown error"}
)}+ {session.description} +
+ ) : null} ++ {session.title} +
+ {session.description ? ( ++ {session.description} +
+ ) : null} ++ This session video link is invalid. +
++ Topics covered +
+ + {session.topics?.length ? ( ++ {topic.topic} +
++ No topics listed for this session yet. +
+ )} +- Topics Covered -
-