Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add video and discussion analytics #93

Merged
merged 4 commits into from
Nov 13, 2024

Conversation

saeedbashir
Copy link

Description

Jira Ticket: LEARNER-10275

This PR adds the following new analytics:

Video Related Analytics

  • Video:Loaded
  • Video:Change Speed
  • Video:Played
  • Video:Paused
  • Video:Completed

Discussions Related Analytics

  • Discussion:Post Created
  • Discussion:Response Added
  • Discussion:Comment Added
  • Dicussion:Post Follow Toggle

The calling of following analytics has been addressed:

  • Logistration:Courses Search
  • Logistration:Explore All Courses

@rnr
Copy link
Collaborator

rnr commented Nov 5, 2024

@saeedbashir please look on failed Tests. Thank you

}

private func trackVideoPlayed() {
analytics?.videoLoaded(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we should use videoPlayed here?

@saeedbashir saeedbashir requested a review from rnr November 6, 2024 05:41
Copy link
Collaborator

@rnr rnr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you

@@ -89,6 +90,7 @@ public struct StartupView: View {
searchQuery: searchQuery,
sourceScreen: .startup
)
viewModel.logAnalytics(searchQuery: nil)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion:
We can replace:

func logAnalytics(searchQuery: String?)

with:

func logAnalytics(searchQuery: String? = nil)

It will avoid to pass mandatory nil parameter:

viewModel.logAnalytics(searchQuery: nil)

To:

viewModel.logAnalytics()


func videoPlayed(courseID: String, blockID: String, videoURL: String)

func videoChangeSpeed(
Copy link

@shafqat-muneer shafqat-muneer Nov 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't videoSpeedChange be more appropriate?

topicID: topicID,
postType: postType,
followPost: followPost,
author: storage?.user?.username ?? ""

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In trackCommentAdded( & trackResponseAdded(, we are using author as newComment.authorName but in analytics?.discussionCreateNewPost(, we are using storage?.user?.username as an author attribute. Is it intentional?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it's intentional.

In trackCommentAdded( & trackResponseAdded(, we are using author as newComment.authorName
At these locations, new comment and new response object is available so authorname is available there so using

but in analytics?.discussionCreateNewPost(, we are using storage?.user?.username as an author attribute. Is it intentional?

Newly created thread object is not available so using the logged in user detail as user created the thread.

@saeedbashir saeedbashir merged commit 2463666 into 2U/develop Nov 13, 2024
2 checks passed
@saeedbashir saeedbashir deleted the saeed/LEARNER-10275 branch November 13, 2024 08:12
rnr pushed a commit that referenced this pull request Dec 19, 2024
rnr added a commit that referenced this pull request Dec 30, 2024
* chore: add video and discussion analytics (#93)

* fix: fixes after merge, deleted IAP parts

* chore: changed dependency version, deleted unused analytics part

* chore: regenerate mocks

* chore: In app ratings modal and profile picture picture sheet UI improvements (#94)

* chore: show subtitles for videos in full-screen mode (#97)

* fix: after merge

* fix: iOS 18 Toggle tap gesture (#98)

* fix: added priority for toggle tap gesture

* fix: fixed tap and drag actions for Toggle

---------

Co-authored-by: Anton Yarmolenko <[email protected]>

* fix: gesture for ios 18.2

* chore: quick fix with performance for subtitles view

---------

Co-authored-by: Saeed Bashir <[email protected]>
Co-authored-by: Anton Yarmolenko <[email protected]>
Co-authored-by: Shafqat Muneer <[email protected]>
rnr added a commit that referenced this pull request Jan 9, 2025
* chore: add video and discussion analytics (#93)

* fix: fixes after merge, deleted IAP parts

* chore: changed dependency version, deleted unused analytics part

* chore: regenerate mocks

* chore: In app ratings modal and profile picture picture sheet UI improvements (#94)

* chore: show subtitles for videos in full-screen mode (#97)

* fix: after merge

* fix: iOS 18 Toggle tap gesture (#98)

* fix: added priority for toggle tap gesture

* fix: fixed tap and drag actions for Toggle

---------

Co-authored-by: Anton Yarmolenko <[email protected]>

* fix: gesture for ios 18.2

* chore: quick fix with performance for subtitles view

* chore: sign-in and register screens social sign in improvements (#95)

* chore: fix after merge

* fix: fix microsoft login issue on iOS after config branch merges (#96)

* refactor: change the microsoft key name in the script (#101)

* chore: fix access modifier

* chore: re-generate nocks

* chore: hide grades when sub section dependents not available (#99)

* chore: fix after merge

* chore: hide progress points from assignment status (#100)

* chore: fix test

---------

Co-authored-by: Saeed Bashir <[email protected]>
Co-authored-by: Anton Yarmolenko <[email protected]>
Co-authored-by: Shafqat Muneer <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants