-
Notifications
You must be signed in to change notification settings - Fork 4
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
Feature/10030+10028 create analytics and trigger #10279
Feature/10030+10028 create analytics and trigger #10279
Conversation
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.
Approving with optional suggestions
VAMobile/src/constants/analytics.ts
Outdated
}, | ||
vama_feedback_closed: (screen: string): Event => { | ||
return { | ||
name: 'vama_feedback_page_exit', |
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.
Any reason the event name differs from the function name? Usually they'd be the same
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.
Because it was originally exit and was too long and i forgot to change the name lol editing now.
const lastReviewVersion = await AsyncStorage.getItem(STORAGE_LAST_REVIEW_VERSION) | ||
|
||
if (days > IN_APP_REVIEW_INTERVAL_DAYS && lastReviewVersion !== versionName) { | ||
export const useReviewEvent = (screenView?: boolean, feedbackScreen?: string): (() => Promise<void>) => { |
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.
You could move these args to the reviewEvent function that this function returns. Optional but it means fewer code changes overall. Also consider renaming screenView to isScreenView since it's a boolean
const reviewEvent = async () => { | ||
if (!featureEnabled('inAppReview') && !featureEnabled('inAppFeedback')) return | ||
//Checked for feedbackScreen triggers first. | ||
if (featureEnabled('inAppFeedback') && feedbackScreen) { |
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.
Consider moving this feedback part to a separate function since it feels like a distinct piece of code (optional)
Description of Change
Screenshots/Video
Testing
Reviewer Validations
PR Checklist
Reviewer: Confirm the items below as you review
For QA
Run a build for this branch