-
Notifications
You must be signed in to change notification settings - Fork 107
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
[SIW-1953] Mixpanel tracking of new ITWallet feature #6601
base: SIW-1918-add-ipatente-cta-in-mdl-details-screen
Are you sure you want to change the base?
[SIW-1953] Mixpanel tracking of new ITWallet feature #6601
Conversation
Jira Pull Request LinkThis Pull Request refers to the following Jira issue SIW-1953 |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## SIW-1918-add-ipatente-cta-in-mdl-details-screen #6601 +/- ##
===================================================================================
- Coverage 49.37% 49.34% -0.03%
===================================================================================
Files 1566 1566
Lines 32247 32281 +34
Branches 7335 7334 -1
===================================================================================
+ Hits 15921 15930 +9
- Misses 16276 16313 +37
+ Partials 50 38 -12
... and 28 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
trackAuthenticationStart( | ||
serviceId, | ||
serviceName, | ||
serviceOrganizationName, | ||
serviceOrganizationFiscalCode, | ||
label, | ||
"message_detail" | ||
); |
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.
What do you think about creating a specific function for this tracking, removing the need to have const values here?
Also, I think message_detail
is not correct for this specific use case. Should be something different, like "credential_detail".
failure: ({ event }) => mapEventToFailure(event) | ||
failure: ({ event, context }) => { | ||
const failure = mapEventToFailure(event); | ||
trackItwTrustmarkRenewFailure(CREDENTIALS_MAP[context.credentialType]); |
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 is an assigment action, which should be pure. We should create an action specific for this tracking and call it in the entry
transition of Failure
state.
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're right, thanks for the suggestion. Addressed in 9318e43
…ack trustmark failure
const serviceOrganizationName = | ||
"Ministero delle infrastrutture e dei trasporti"; | ||
const serviceOrganizationFiscalCode = "97532760580"; | ||
const serviceName = "Motorizzazione Civile - Le mie patenti"; |
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.
What if the service is later renamed to something else? Or the organisation? Or what if the service is recreated, with different ids? Apart from keeping track of such changes, this code will send bad data to the mixpanel boards and we will have to release a new version of the application in order to change it.
Why do not we use a CDN to store these data?
Short description
This PR add the tracking on mixpanel of some ITWallet events
Warning
Depens on #6577
List of changes proposed in this pull request
trackItwStatusWalletAttestationFailure
when the wallet attestation fails.trackItwStatusCredentialAttestationFailure
when the credential attestation failstrackItwTrustmarkRenewFailure
when the generation of the QR Code for attesting the authenticity of the credential failstrackCredentialCardModal
when a credential is viewed in landscape modeFIMS_START
by clicking the CTA towardsiPatente
through thetrackAuthenticationStart
functionItwPresentationDetailsFooter
const for trackingiPatente
serviceHow to test
Verify that the newly added events are tracked correctly