-
Notifications
You must be signed in to change notification settings - Fork 9
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
Refactor: analytics for EnrollmentFlow
#2379
Conversation
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
Preview url: https://benefits-2379--cal-itp-previews.netlify.app |
b3d0be1
to
bf2632a
Compare
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.
The code changes look good to me! Just left a suggestion on naming.
this is a more accurate value, and matches the internal EnrollmentEvent
e3de3c5
to
455b011
Compare
hide the usage of flow.system_name from callers, this is an implementation detail of the analytics code
455b011
to
b7d9993
Compare
I refactored this in b7d9993, good call! The logic for getting the value for analytics is now in one place, and hidden away from callers. |
if status == "success": | ||
self.update_user_properties(eligibility_types=eligibility_types) |
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.
Just noting for future reference that now we'll capture the enrollment flow as a user property for all ReturnedEligibilityEvent
s, not just successful ones.
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.
This logic is (was) already present ... i.e. creating a new EligibilityEvent
always updated the event/user properties with the flow (eligibility type in the past).
I couldn't find a reason for this specific case of also updating it on success... it would have already been done by the user selecting their flow.
Good call out though.
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.
Looks good!
Part of #2248, update new events that are sent.
eligibility_types
toenrollment_flows
selected eligibility verifier
toselected enrollment flow
eligibility_verifier
to the same logic as from Model and capture local enrollment events #2267