diff --git a/core/src/main/java/org/openedx/core/module/download/BaseDownloadViewModel.kt b/core/src/main/java/org/openedx/core/module/download/BaseDownloadViewModel.kt index b6e8a33dc..edf4910f5 100644 --- a/core/src/main/java/org/openedx/core/module/download/BaseDownloadViewModel.kt +++ b/core/src/main/java/org/openedx/core/module/download/BaseDownloadViewModel.kt @@ -246,10 +246,7 @@ abstract class BaseDownloadViewModel( logEvent( CoreAnalyticsEvent.VIDEO_BULK_DOWNLOAD_TOGGLE, buildMap { - put( - CoreAnalyticsKey.ACTION.key, - if (toggle) CoreAnalyticsKey.TRUE.key else CoreAnalyticsKey.FALSE.key - ) + put(CoreAnalyticsKey.ACTION.key, toggle) } ) } diff --git a/core/src/main/java/org/openedx/core/presentation/CoreAnalytics.kt b/core/src/main/java/org/openedx/core/presentation/CoreAnalytics.kt index ed9ebd853..227fb6f4c 100644 --- a/core/src/main/java/org/openedx/core/presentation/CoreAnalytics.kt +++ b/core/src/main/java/org/openedx/core/presentation/CoreAnalytics.kt @@ -50,8 +50,6 @@ enum class CoreAnalyticsKey(val key: String) { OLD_VALUE("old_value"), COURSE_ID("course_id"), BLOCK_ID("block_id"), - TRUE("true"), - FALSE("false"), NUMBER_OF_VIDEOS("number_of_videos"), } diff --git a/core/src/main/java/org/openedx/core/presentation/dialog/appreview/AppReviewAnalytics.kt b/core/src/main/java/org/openedx/core/presentation/dialog/appreview/AppReviewAnalytics.kt index 975c62ce9..82027216e 100644 --- a/core/src/main/java/org/openedx/core/presentation/dialog/appreview/AppReviewAnalytics.kt +++ b/core/src/main/java/org/openedx/core/presentation/dialog/appreview/AppReviewAnalytics.kt @@ -19,7 +19,7 @@ enum class AppReviewAnalyticsKey(val key: String) { NAME("name"), CATEGORY("category"), RATING("rating"), - APP_REVIEW("app_review"), + APP_REVIEWS("app_reviews"), ACTION("action"), DISMISSED("dismissed"), NOT_NOW("not_now"), diff --git a/core/src/main/java/org/openedx/core/presentation/dialog/appreview/BaseAppReviewDialogFragment.kt b/core/src/main/java/org/openedx/core/presentation/dialog/appreview/BaseAppReviewDialogFragment.kt index dac71cf77..57dcdc233 100644 --- a/core/src/main/java/org/openedx/core/presentation/dialog/appreview/BaseAppReviewDialogFragment.kt +++ b/core/src/main/java/org/openedx/core/presentation/dialog/appreview/BaseAppReviewDialogFragment.kt @@ -26,7 +26,7 @@ open class BaseAppReviewDialogFragment : DialogFragment() { event = AppReviewAnalyticsEvent.RATING_DIALOG.eventName, params = buildMap { put(AppReviewAnalyticsKey.NAME.key, AppReviewAnalyticsEvent.RATING_DIALOG.biValue) - put(AppReviewAnalyticsKey.CATEGORY.key, AppReviewAnalyticsKey.APP_REVIEW.key) + put(AppReviewAnalyticsKey.CATEGORY.key, AppReviewAnalyticsKey.APP_REVIEWS.key) } ) } @@ -65,7 +65,7 @@ open class BaseAppReviewDialogFragment : DialogFragment() { AppReviewAnalyticsKey.NAME.key, AppReviewAnalyticsEvent.RATING_DIALOG_ACTION.biValue ) - put(AppReviewAnalyticsKey.CATEGORY.key, AppReviewAnalyticsKey.APP_REVIEW.key) + put(AppReviewAnalyticsKey.CATEGORY.key, AppReviewAnalyticsKey.APP_REVIEWS.key) put(AppReviewAnalyticsKey.ACTION.key, action) rating.nonZero()?.let { put(AppReviewAnalyticsKey.RATING.key, it) } } diff --git a/course/src/main/java/org/openedx/course/presentation/CourseAnalytics.kt b/course/src/main/java/org/openedx/course/presentation/CourseAnalytics.kt index 14de268f3..8544e4130 100644 --- a/course/src/main/java/org/openedx/course/presentation/CourseAnalytics.kt +++ b/course/src/main/java/org/openedx/course/presentation/CourseAnalytics.kt @@ -129,12 +129,12 @@ enum class CourseAnalyticsEvent(val eventName: String, val biValue: String) { "PLS:Shift Button Clicked", "edx.bi.app.dates.pls_banner.shift_dates.clicked" ), - PLS_SHIFT_DATES( - "PLS:Shift Dates", - "edx.bi.app.dates.pls_banner.shift_dates" + PLS_SHIFT_DATES_SUCCESS( + "PLS:Shift Dates Success", + "edx.bi.app.dates.pls_banner.shift_dates.success" ), DATES_CALENDAR_SYNC_TOGGLE( - "Dates:CalendarSync Toggle", + "Dates:CalendarSync Toggle Clicked", "edx.bi.app.dates.calendar_sync.toggle" ), DATES_CALENDAR_SYNC_DIALOG_ACTION( @@ -154,7 +154,7 @@ enum class CourseAnalyticsKey(val key: String) { OPEN_IN_BROWSER("open_in_browser_url"), COMPONENT("component"), VIDEO_PLAYER("video_player"), - ENROLLMENT_MODE("mode"), + ENROLLMENT_MODE("enrollment_mode"), PACING("pacing"), SCREEN_NAME("screen_name"), BANNER_TYPE("banner_type"), @@ -177,8 +177,10 @@ enum class CourseAnalyticsKey(val key: String) { ACTION("action"), ON("on"), OFF("off"), - SNACKBAR("snackbar"), + SNACKBAR_TYPE("snackbar_type"), COURSE_DATES("course_dates"), + SELF_PACED("self"), + INSTRUCTOR_PACED("instructor"), } enum class CalendarSyncDialog( @@ -186,11 +188,11 @@ enum class CalendarSyncDialog( private val positiveAction: String, private val negativeAction: String, ) { - PERMISSION("permission", "allow", "donot_allow"), - ADD("add", "ok", "cancel"), - REMOVE("remove", "ok", "cancel"), - UPDATE("update", "update", "remove"), - CONFIRMED("confirmed", "view_event", "done"); + PERMISSION("device_permission", "allow", "donot_allow"), + ADD("add_calendar", "add", "cancel"), + REMOVE("remove_calendar", "remove", "cancel"), + UPDATE("update_calendar", "update", "remove"), + CONFIRMED("events_added", "view_event", "done"); fun getBuildMap(action: Boolean): Map { return buildMap { @@ -201,13 +203,13 @@ enum class CalendarSyncDialog( } enum class CalendarSyncSnackbar(private val snackbar: String) { - ADD("add"), - REMOVE("remove"), - UPDATE("update"); + ADDED("added"), + REMOVED("removed"), + UPDATED("updated"); fun getBuildMap(): Map { return buildMap { - put(CourseAnalyticsKey.SNACKBAR.key, snackbar) + put(CourseAnalyticsKey.SNACKBAR_TYPE.key, snackbar) } } } diff --git a/course/src/main/java/org/openedx/course/presentation/container/CourseContainerViewModel.kt b/course/src/main/java/org/openedx/course/presentation/container/CourseContainerViewModel.kt index cf78bb207..43a3be5c1 100644 --- a/course/src/main/java/org/openedx/course/presentation/container/CourseContainerViewModel.kt +++ b/course/src/main/java/org/openedx/course/presentation/container/CourseContainerViewModel.kt @@ -218,10 +218,10 @@ class CourseContainerViewModel( updateCalendarSyncState() if (updatedEvent) { - logCalendarSyncSnackbar(CalendarSyncSnackbar.UPDATE) + logCalendarSyncSnackbar(CalendarSyncSnackbar.UPDATED) setUiMessage(R.string.course_snackbar_course_calendar_updated) } else if (coursePreferences.isCalendarSyncEventsDialogShown(courseName)) { - logCalendarSyncSnackbar(CalendarSyncSnackbar.ADD) + logCalendarSyncSnackbar(CalendarSyncSnackbar.ADDED) setUiMessage(R.string.course_snackbar_course_calendar_added) } else { coursePreferences.setCalendarSyncEventsDialogShown(courseName) @@ -265,7 +265,7 @@ class CourseContainerViewModel( updateCalendarSyncState() } - logCalendarSyncSnackbar(CalendarSyncSnackbar.REMOVE) + logCalendarSyncSnackbar(CalendarSyncSnackbar.REMOVED) setUiMessage(R.string.course_snackbar_course_calendar_removed) } } @@ -379,7 +379,11 @@ class CourseContainerViewModel( put(CourseAnalyticsKey.NAME.key, event.biValue) put(CourseAnalyticsKey.COURSE_ID.key, courseId) put(CourseAnalyticsKey.ENROLLMENT_MODE.key, enrollmentMode) - put(CourseAnalyticsKey.PACING.key, isSelfPaced) + put( + CourseAnalyticsKey.PACING.key, + if (isSelfPaced) CourseAnalyticsKey.SELF_PACED.key + else CourseAnalyticsKey.INSTRUCTOR_PACED.key + ) putAll(param) } ) diff --git a/course/src/main/java/org/openedx/course/presentation/dates/CourseDatesViewModel.kt b/course/src/main/java/org/openedx/course/presentation/dates/CourseDatesViewModel.kt index 8fa8ad43e..52fe7c5e3 100644 --- a/course/src/main/java/org/openedx/course/presentation/dates/CourseDatesViewModel.kt +++ b/course/src/main/java/org/openedx/course/presentation/dates/CourseDatesViewModel.kt @@ -225,7 +225,7 @@ class CourseDatesViewModel( } fun logPlsShiftDates(isSuccess: Boolean) { - logPLSBannerEvent(CourseAnalyticsEvent.PLS_SHIFT_DATES, isSuccess) + logPLSBannerEvent(CourseAnalyticsEvent.PLS_SHIFT_DATES_SUCCESS, isSuccess) } fun logCourseComponentTapped(isSupported: Boolean, block: CourseDateBlock) { @@ -261,7 +261,11 @@ class CourseDatesViewModel( put(CourseAnalyticsKey.NAME.key, event.biValue) put(CourseAnalyticsKey.COURSE_ID.key, courseId) put(CourseAnalyticsKey.ENROLLMENT_MODE.key, enrollmentMode) - put(CourseAnalyticsKey.PACING.key, isSelfPaced) + put( + CourseAnalyticsKey.PACING.key, + if (isSelfPaced) CourseAnalyticsKey.SELF_PACED.key + else CourseAnalyticsKey.INSTRUCTOR_PACED.key + ) putAll(param) } ) diff --git a/profile/src/main/java/org/openedx/profile/presentation/ProfileAnalytics.kt b/profile/src/main/java/org/openedx/profile/presentation/ProfileAnalytics.kt index bcab1126d..2422ba505 100644 --- a/profile/src/main/java/org/openedx/profile/presentation/ProfileAnalytics.kt +++ b/profile/src/main/java/org/openedx/profile/presentation/ProfileAnalytics.kt @@ -50,7 +50,7 @@ enum class ProfileAnalyticsEvent(val eventName: String, val biValue: String) { "edx.bi.app.profile.delete_account.clicked" ), USER_DELETE_ACCOUNT_CLICKED( - "Profile:User Delete Account Success", + "Profile:User Delete Account Clicked", "edx.bi.app.profile.user.delete_account.clicked" ), DELETE_ACCOUNT_SUCCESS( @@ -80,6 +80,5 @@ enum class ProfileAnalyticsKey(val key: String) { LIMITED_PROFILE("limited_profile"), SUCCESS("success"), FORCE("force"), - TRUE("true"), FALSE("false"), } diff --git a/profile/src/main/java/org/openedx/profile/presentation/settings/video/VideoSettingsViewModel.kt b/profile/src/main/java/org/openedx/profile/presentation/settings/video/VideoSettingsViewModel.kt index 475ff228a..bb91ea3ae 100644 --- a/profile/src/main/java/org/openedx/profile/presentation/settings/video/VideoSettingsViewModel.kt +++ b/profile/src/main/java/org/openedx/profile/presentation/settings/video/VideoSettingsViewModel.kt @@ -54,10 +54,7 @@ class VideoSettingsViewModel( logProfileEvent( ProfileAnalyticsEvent.WIFI_TOGGLE, buildMap { - put( - ProfileAnalyticsKey.ACTION.key, - if (value) ProfileAnalyticsKey.TRUE.key else ProfileAnalyticsKey.FALSE.key - ) + put(ProfileAnalyticsKey.ACTION.key, value) } ) }