chore: analytics

This commit is contained in:
Jannat Patel
2024-08-12 17:13:31 +05:30
parent b956c4e383
commit 703fafd6c3
19 changed files with 151 additions and 64 deletions

View File

@@ -82,6 +82,7 @@ import EditorJS from '@editorjs/editorjs'
import LessonPlugins from '@/components/LessonPlugins.vue'
import { ChevronRight } from 'lucide-vue-next'
import { updateDocumentTitle, createToast, getEditorTools } from '@/utils'
import { capture } from '@/telemetry'
const editor = ref(null)
const instructorEditor = ref(null)
@@ -108,6 +109,7 @@ onMounted(() => {
if (!user.data?.is_moderator && !user.data?.is_instructor) {
window.location.href = '/login'
}
capture('lesson_form_opened')
editor.value = renderEditor('content')
instructorEditor.value = renderEditor('instructor-notes')
})
@@ -360,6 +362,7 @@ const createNewLesson = () => {
{ lesson: data.name },
{
onSuccess() {
capture('lesson_created')
showToast('Success', 'Lesson created successfully', 'check')
lessonDetails.reload()
},