diff --git a/src/lib/components/CourseLandingPage/components/PricingSection.svelte b/src/lib/components/CourseLandingPage/components/PricingSection.svelte index 7e18d24f..ec9eba5c 100644 --- a/src/lib/components/CourseLandingPage/components/PricingSection.svelte +++ b/src/lib/components/CourseLandingPage/components/PricingSection.svelte @@ -9,6 +9,7 @@ import PaymentModal from './PaymentModal.svelte'; import type { Course } from '$lib/utils/types'; import { ROLE } from '$lib/utils/constants/roles'; + import { capturePosthogEvent } from '$lib/utils/services/posthog'; export let className = ''; export let editMode = false; @@ -31,6 +32,12 @@ function handleJoinCourse() { if (editMode) return; + capturePosthogEvent('join_course', { + course_id: courseData.id, + course_title: courseData.title, + course_cost: courseData.cost, + course_free: isFree + }); if (isFree) { const link = getStudentInviteLink(courseData, $currentOrg.siteName); goto(link); diff --git a/src/routes/invite/s/[hash]/+page.svelte b/src/routes/invite/s/[hash]/+page.svelte index b9d6db17..875bbcfe 100644 --- a/src/routes/invite/s/[hash]/+page.svelte +++ b/src/routes/invite/s/[hash]/+page.svelte @@ -15,7 +15,7 @@ NOTIFICATION_NAME } from '$lib/utils/services/notification/notification'; import { snackbar } from '$lib/components/Snackbar/store.js'; - import { capturePosthogEvent } from '$lib/utils/services/posthog/index.js'; + import { capturePosthogEvent } from '$lib/utils/services/posthog'; export let data;