MetaMask / MetaMask/metamask-mobile

Implement Typewriter into the mobile MetaMetrics

Open
#16,452 0 comments 0 reactions 0 assignees View on GitHub
team-mobile-platform
Dominant language
TypeScript
Stars
3k
Forks
1.7k
Avg merge
1d 14h
Merged PRs (30d)
669

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 (and the plugin we're currently using) 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 (#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

- [x] 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 Typewriter POC in PR #15445, then compare its generated client and segmentClient integration with the current mobile client and plugin. Read the Typewriter and Rapid references, clarify how sensitiveProperties must be handled, and define acceptance criteria for new event calls, lint errors, and runtime reporting before implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native, typescript
Domain
analytics, mobile
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.