diff --git a/src/components/Schedule/ScheduleEventModal.tsx b/src/components/Schedule/ScheduleEventModal.tsx index 221805fe8..f01d4cbc0 100644 --- a/src/components/Schedule/ScheduleEventModal.tsx +++ b/src/components/Schedule/ScheduleEventModal.tsx @@ -96,6 +96,12 @@ Visit the roadmap at https://roadmap.sh/${roadmapId} const handleDownloadICS = () => { setIsLoading(true); + const calendarTitle = selectedCalendar || 'ICS'; + + triggerScheduleEvent( + `${calendarTitle.charAt(0).toUpperCase()}${calendarTitle.slice(1)}`, + ); + const startDate = DateTime.now().minus({ minutes: DateTime.now().minute % 30, }); @@ -119,8 +125,19 @@ Visit the roadmap at https://roadmap.sh/${roadmapId} URL.revokeObjectURL(url); }; + const triggerScheduleEvent = function (type: string) { + window.fireEvent({ + category: 'ScheduleTimeClick', + action: `Schedule Learning Time`, + label: `Schedule Learning Time / ${type}`, + value: `Schedule Learning Time / ${type}`, + }); + }; + const handleGoogleCalendar = () => { setIsLoading(true); + triggerScheduleEvent('Google'); + const baseURL = 'https://calendar.google.com/calendar/render?action=TEMPLATE'; @@ -293,7 +310,7 @@ export function CalendarSteps(props: CalendarStepsProps) {
{steps.map((step, index) => (
-
+
{index + 1}
@@ -305,7 +322,7 @@ export function CalendarSteps(props: CalendarStepsProps) {