MetaMask / MetaMask/metamask-extension

Implement Typewriter into the extension MetaMetrics

Open
#33,736 0 comments 0 reactions 0 assignees View on GitHub
team-extension-platform
Dominant language
TypeScript
Stars
13.2k
Forks
5.6k
Avg merge
2d 5h
Merged PRs (30d)
451

Description

### What is this about?

As part of the QA Q2 OKR goals, a POC was created around the usage of typewriter into the mobile app.
The main goal is to have new event tracking calls being performed by the typewriter generated client, all existing event tracking will be transitioned by each feature team once the adaptation has been made.

### Scenario

_No response_

### Design

_No response_

### Technical Details

Typewriter generates the code automatically to call event tracking through a segmentClient, this means that our current client needs to be adapt to use this new client.

Note:
The POC currently does not include logic to add sensitiveProperties like our clients currently do.

Reference docs:
Typewriter POC: https://github.com/MetaMask/metamask-mobile/pull/15445
Typewriter documentation: https://segment.com/docs/protocols/apis-and-extensions/typewriter/#react-native-quickstart
Rapid: https://docs.google.com/document/d/13rKPcETATGD4aGBbGE6xeHsyphMCbXI1hJukGzlPhwk/edit?tab=t.0#heading=h.7xc80xncm0rb (check the demo video in the Detailed Recommendation (https://github.com/MetaMask/metamask-mobile/pull/1)

### Threat Modeling Framework

This aims to solve the situation where some event properties might be missing as lint erros will appear if the needed properties are not provided to an event.
For runtime situations, Sentry will report the exception being thrown too which also removes the possibility of having wrong event tracking calls.

### Acceptance Criteria

_No response_

### Stakeholder review needed before the work gets merged

- [ ] Engineering (needed in most cases)
- [ ] Design
- [ ] Product
- [ ] QA (automation tests are required to pass before merging PRs but not all changes are covered by automation tests - please review if QA is needed beyond automation tests)
- [ ] Security
- [ ] Legal
- [ ] Marketing
- [ ] Management (please specify)
- [ ] Other (please specify)

### References

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the linked Typewriter POC, the Typewriter documentation, and the extension's existing MetaMetrics client and event-tracking entry points. Confirm how generated calls should replace the current client for new events, how sensitiveProperties are handled, and what tests demonstrate that required event properties are enforced.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
analytics
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.