metamask-extension
metamask-extension copied to clipboard
Add more tracking for MetaMask
Explanation
This PR adds some more tracking for MetaMask:
App Installed(only if a user opted into metrics)signup_datetracking via traitsSupport Link Clickedfor all links that use theSUPPORT_REQUEST_LINKconstantNew Wallet Createdevent after a user clicks onRemind me later(skips seed backup)App Uninstalledvia a URL that needs to be implemented first, currently this code is disabled- Track
Support Link Clickedevents also for theSUPPORT_LINKconstant
Manual Testing Steps
App Installed and New Wallet Created events
- Remove the extension
- In
scripts/background.jsremove this condition:!(process.env.METAMASK_DEBUG || process.env.IN_TEST)from thebrowser.runtime.onInstalledlistener - Run
yarn start - Install the extension
- Check the background.html dev tools, specifically the Network tab and search for
batch, which shows our tracking requests - After you enable metrics, you will see that the
App Installedevent is tracked - Create a new wallet and look for the
New Wallet Createdevent when you click onRemind me laterto skip seed backup
Support Link Clicked
- Open the extension, click on your profile (top right corner)
- Click on
Support, which opens a new tab
- Verify that the
Support Link Clickedevent was tracked if you allowed tracking
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.
@worldlyjohn Could you review the schema/format of these events?
aside from moving signup_date from event property to user trait... everything else looks good from a schema POV!
re-triggered tests cause the unit test failure is a flaky test