Skip to content
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 currency conversion telemetry #26876

Merged
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
55820b6
Add currency conversion telemetry
gambinish Sep 3, 2024
b01a18b
Merge branch 'develop' into chore/mmassets-344_add-telemetry-currency…
gambinish Sep 3, 2024
9257eed
Merge branch 'develop' into chore/mmassets-344_add-telemetry-currency…
gambinish Sep 4, 2024
ff30288
Merge branch 'develop' into chore/mmassets-344_add-telemetry-currency…
gambinish Sep 5, 2024
cebe1a7
Merge branch 'develop' into chore/mmassets-344_add-telemetry-currency…
gambinish Sep 6, 2024
7e8cf3e
Merge branch 'develop' into chore/mmassets-344_add-telemetry-currency…
gambinish Sep 9, 2024
79ab492
Add CurrentCurrency to UserTraits object
gambinish Sep 9, 2024
2f9f3f0
Cleanup
gambinish Sep 9, 2024
485f8c6
Update token scam warning with new messaging and expected token value
gambinish Sep 9, 2024
2d7e19d
Remove MATIC token collision warning
gambinish Sep 9, 2024
9a4bc17
Remove MATIC chain collision constant
gambinish Sep 9, 2024
61f2e91
Merge branch 'develop' into chore/mmassets-344_add-telemetry-currency…
gambinish Sep 9, 2024
d2b0128
Revert locale string change
gambinish Sep 9, 2024
d9c1673
Merge branch 'chore/mmassets-344_add-telemetry-currency-conversion' o…
gambinish Sep 9, 2024
f72dc26
Revert changes from bugfix
gambinish Sep 9, 2024
cdaef25
Revert bugfix unit test
gambinish Sep 9, 2024
0add1f3
Merge branch 'develop' into chore/mmassets-344_add-telemetry-currency…
gambinish Sep 10, 2024
87fa73a
Merge branch 'develop' into chore/mmassets-344_add-telemetry-currency…
gambinish Sep 12, 2024
b0f0642
Merge branch 'develop' into chore/mmassets-344_add-telemetry-currency…
gambinish Sep 13, 2024
0bbaec6
Merge branch 'develop' into chore/mmassets-344_add-telemetry-currency…
gambinish Sep 17, 2024
575ad4a
Merge branch 'develop' into chore/mmassets-344_add-telemetry-currency…
gambinish Sep 17, 2024
a2a83b4
Merge branch 'develop' into chore/mmassets-344_add-telemetry-currency…
gambinish Sep 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions shared/constants/metametrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,7 @@ export enum MetaMetricsEventName {
BridgeLinkClicked = 'Bridge Link Clicked',
BitcoinSupportToggled = 'Bitcoin Support Toggled',
BitcoinTestnetSupportToggled = 'Bitcoin Testnet Support Toggled',
CurrentCurrencyChanged = 'Selected Currency Changed',
DappViewed = 'Dapp Viewed',
DecryptionApproved = 'Decryption Approved',
DecryptionRejected = 'Decryption Rejected',
Expand Down
11 changes: 10 additions & 1 deletion ui/pages/settings/settings-tab/settings-tab.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,16 @@ export default class SettingsTab extends PureComponent {
id="select-currency"
options={currencyOptions}
selectedOption={currentCurrency}
onChange={(newCurrency) => setCurrentCurrency(newCurrency)}
onChange={(newCurrency) => {
setCurrentCurrency(newCurrency);
this.context.trackEvent({
category: MetaMetricsEventCategory.Settings,
event: MetaMetricsEventName.CurrentCurrencyChanged,
sensitiveProperties: {
current_currency_changed: newCurrency,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering if there is a reason why we are using sensitiveProperties instead of properties here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will change! Doesn't need to be sensitive. Also needs to be added to the user object anyway 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated! I also added the trait to MetaMetricsUserTrait to get added to the user, which is what we want to track (not how many times the toggle was clicked)

},
});
}}
/>
</div>
</div>
Expand Down