You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add account_type/snap_id for buy/send metrics (MetaMask#28011)
## **Description**
Adds more context/info to the Send/Buy events for both Ethereum and
Bitcoin overview screens.
[](https://codespaces.new/MetaMask/metamask-extension/pull/28011?quickstart=1)
## **Related issues**
Fixes: MetaMask/accounts-planning#636,
MetaMask/accounts-planning#637
## **Manual testing steps**
- Cherry-pick this commit: f938d6d
* This will allow you to use the verbose mode for the local segment
server
- `node development/mock-segment.js -v`
- `yarn start:flask`
- Create a Bitcoin account (enable support from the experimental
settings)
- Select a Bitcoin account
- Click on "Buy" button using your Bitcoin account
- Click on "Send" button using your Bitcoin account
- Create an Ethereum account
- Click on "Buy" button using your Bitcoin account
- Click on "Send" button using your Bitcoin account
You should see those events from the `mock-segment.js` server output:
```
...
[mock-segment]: Events received: Buy Button Clicked {
"account_type": "bip122:p2wpkh",
"location": "Home",
"text": "Buy",
"chain_id": "bip122:000000000019d6689c085ae165831e93",
"snap_id": "npm:@metamask/bitcoin-wallet-snap",
"category": "Navigation",
"locale": "en",
"environment_type": "popup"
}
...
[mock-segment]: Events received: Send Button Clicked {
"account_type": "bip122:p2wpkh",
"token_symbol": "BTC",
"location": "Home",
"text": "Send",
"chain_id": "bip122:000000000019d6689c085ae165831e93",
"snap_id": "npm:@metamask/bitcoin-wallet-snap",
"category": "Navigation",
"locale": "en",
"environment_type": "popup"
}
...
[mock-segment]: Events received: Buy Button Clicked {
"account_type": "eip155:eoa",
"location": "Home",
"text": "Buy",
"chain_id": "0x1",
"token_symbol": {
"symbol": "ETH",
"name": "Ether",
"address": "0x0000000000000000000000000000000000000000",
"decimals": 18,
"iconUrl": "./images/eth_logo.svg",
"balance": "0",
"string": "0"
},
"category": "Navigation",
"locale": "en",
"environment_type": "popup"
}
...
[mock-segment]: Events received: Send Button Clicked {
"account_type": "eip155:eoa",
"token_symbol": "ETH",
"location": "Home",
"text": "Send",
"chain_id": "0x1",
"category": "Navigation",
"locale": "en",
"environment_type": "popup"
}
...
```
## **Screenshots/Recordings**
### **Before**
### **After**
## **Pre-merge author checklist**
- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I’ve included tests if applicable
- [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
## **Pre-merge reviewer checklist**
- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
0 commit comments