mozilla / fxa

Monorepo for Mozilla Accounts (formerly Firefox Accounts)
https://mozilla.github.io/ecosystem-platform/
Mozilla Public License 2.0
580 stars 210 forks source link

fix(metrics): always use the metrics flow data in `Metrics` model when redirecting in third party auth #17129

Closed vbudhram closed 1 month ago

vbudhram commented 1 month ago

Because

This pull request

Issue that this pull request solves

Closes: https://mozilla-hub.atlassian.net/browse/FXA-9564 Closes: https://mozilla-hub.atlassian.net/browse/FXA-9767

Checklist

Other information (Optional)

I ran through this locally and the flowId stays consistent throughout the third party auth login. No changes are needed in React since it always gets a flowId sent to its views from content-server.

Component Operation Event Type Time User ID Device ID Session ID App Version Language OS Name OS Version User Properties
fxa-content-server amplitudeEvent fxa_third_party_auth - view 1718298775581 N/A 9bad25e8d66f4515aa655fe0c698731b 1718298775386 0.0 en-US Mac OS X 10.15 {"flow_id":"6aad924bb39934ced850a8b7c0e3c6b087a60af145a014bd56ee486d28d96731","ua_browser":"Firefox","ua_version":"126.0"}
fxa-content-server amplitudeEvent fxa_email_first - view 1718298775585 N/A 9bad25e8d66f4515aa655fe0c698731b 1718298775386 0.0 en-US Mac OS X 10.15 {"flow_id":"6aad924bb39934ced850a8b7c0e3c6b087a60af145a014bd56ee486d28d96731","ua_browser":"Firefox","ua_version":"126.0"}
fxa-content-server amplitudeEvent fxa_third_party_auth - google_oauth_start 1718298776701 N/A 9bad25e8d66f4515aa655fe0c698731b 1718298775386 0.0 en-US Mac OS X 10.15 {"flow_id":"6aad924bb39934ced850a8b7c0e3c6b087a60af145a014bd56ee486d28d96731","ua_browser":"Firefox","ua_version":"126.0"}
fxa-auth-server amplitudeEvent fxa_login - success 1718298782014 cd8225ea77e24be9bedefec53c12152c 9bad25e8d66f4515aa655fe0c698731b 1718298775386 0.0 en-US Mac OS X 10.15 {"flow_id":"6aad924bb39934ced850a8b7c0e3c6b087a60af145a014bd56ee486d28d96731","ua_browser":"Firefox","ua_version":"126.0"}
fxa-auth-server amplitudeEvent fxa_login - complete 1718298782014 cd8225ea77e24be9bedefec53c12152c 9bad25e8d66f4515aa655fe0c698731b 1718298775386 0.0 en-US Mac OS X 10.15 {"flow_id":"6aad924bb39934ced850a8b7c0e3c6b087a60af145a014bd56ee486d28d96731","ua_browser":"Firefox","ua_version":"126.0"}
fxa-content-server amplitudeEvent fxa_third_party_auth - google_signin_complete 1718298782039 N/A 9bad25e8d66f4515aa655fe0c698731b 1718298775386 0.0 en-US Mac OS X 10.15 {"flow_id":"6aad924bb39934ced850a8b7c0e3c6b087a60af145a014bd56ee486d28d96731","ua_browser":"Firefox","ua_version":"126.0"}
fxa-content-server amplitudeEvent fxa_pref - view 1718298782427 cd8225ea77e24be9bedefec53c12152c 9bad25e8d66f4515aa655fe0c698731b 1718298775386 0.0 en Mac OS X 10.15 {"flow_id":"6aad924bb39934ced850a8b7c0e3c6b087a60af145a014bd56ee486d28d96731","ua_browser":"Firefox","ua_version":"126.0","$append":{"account_recovery":false,"emails":false,"two_step_authentication":false}}
LZoog commented 1 month ago

@vbudhram Code LGTM especially based on the table you provided, but do we need this fix for React signup and React signin as well?