-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
@saeedbashir please look on failed Tests. Thank you |
} | ||
|
||
private func trackVideoPlayed() { | ||
analytics?.videoLoaded( |
There was a problem hiding this comment.
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?
There was a problem hiding this 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) |
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
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 ?? "" |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
Description
Jira Ticket: LEARNER-10275
This PR adds the following new analytics:
Video Related Analytics
Discussions Related Analytics
The calling of following analytics has been addressed: