Skip to content

feat(platform): add the metamask-extension overlay for analytics - #143

Draft
MajorLift wants to merge 9 commits into
mainfrom
jongsun/add/data-domain
Draft

MajorLift wants to merge 9 commits into
mainfrom
jongsun/add/data-domain

Conversation

@MajorLift

@MajorLift MajorLift commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Motivation

The extension's MetaMetrics and Segment event guidance sits in observability/instrumentation, which a) cites two knowledge files in a data domain that does not exist, and b) overlaps platform/analytics, which also covers tracked events but has no metamask-extension overlay and so is skipped for Extension.

Overview

Adds a metamask-extension overlay to the analytics skill and two knowledge files to the platform domain, and moves event guidance out of observability/instrumentation.

  • analytics gains a metamask-extension overlay for tracking events through useAnalytics, the background trackEvent and createEventBuilder, and the Redux thunk trackAnalyticsEvent, covering adding and updating an event, tests, and a review of excludeMetaMetricsId. Its description now names MetaMetrics and Segment events, and its base workflow no longer names the MetaMask Mobile catalog (EVENT_NAME, generateOpt), test factory or Engine tracking util.
    • domains/platform/knowledge/metametrics-identity.md: which extension MetaMetrics events are sent without the user's analytics ID.
    • domains/platform/knowledge/segment-governance.md: Segment event governance, which is advisory. An event is meant to be registered in the tracking plan kept in Consensys/segment-schema (internal to Consensys), and at e81ed46 no metamask-extension workflow checks an event against that plan.
  • instrumentation now covers Sentry spans and volume estimation from Sentry span data, and its Do Not Use When list names analytics for MetaMetrics and Segment events.
  • sentry-quota names analytics for product-analytics events in its Do Not Use When list, and its three citations of segment-governance.md now point to the platform domain instead of the missing data domain.

Both files are copied beside each platform skill an install selects: analytics for metamask-extension, and analytics, feature-flags and navigation for metamask-mobile, although both describe only the extension.

`metrametrics-identity` and `segment-governance`, split out of the domain
that was called `analytics` and is becoming `observability` in #76. Traces,
errors and span cost are one subject; product analytics is another, and with
MetaMetrics migrating to `AnalyticsController` in both clients this half
needs a name that outlives the tool.

Knowledge only, no skill yet. `tools/install` copies domain knowledge beside
each skill in its domain, so nothing here installs until the domain gains
one — stated in the body rather than discovered at install time.
@MajorLift MajorLift changed the title feat: add a data domain for product-analytics knowledge feat: Adds data domain - product-analytics knowledge Sep 1, 2026
… `main`

The file quoted an `isOptIn` branch in `MetaMetricsController` that
metamask-extension#42885 (integrate analytics controller) removed. Anonymity
is now set per event by `excludeMetaMetricsId`, including a default for
event names starting with `Send` or `Confirm`, and read by the platform
adapter. Citations are pinned to extension `c31416a`.
`@metamask/analytics-controller` sends it once identified without them and
once anonymous with them, so a count over both rows counts it twice. The
analytics ID is a hex string rather than a UUIDv4, and Sentry carries the
same value as `user.id`.
@MajorLift MajorLift changed the title feat: Adds data domain - product-analytics knowledge feat(platform): add the metamask-extension overlay for analytics Sep 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant