Skip to content

remove matomo and route to segment#9646

Merged
brad-decker merged 4 commits intodevelopfrom
matomo-segment-holdover
Oct 26, 2020
Merged

remove matomo and route to segment#9646
brad-decker merged 4 commits intodevelopfrom
matomo-segment-holdover

Conversation

@brad-decker
Copy link
Copy Markdown
Contributor

Replaces usage of the MetaMetrics.util.js library with our new shared segment module by mapping the event tracking signature of the old API to our new one at the provider level.

package.json Outdated
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this as a convenience so that IntelliSense works with types provided via JSdocs and react hooks.

@brad-decker brad-decker force-pushed the matomo-segment-holdover branch from a1c279d to b51d50e Compare October 20, 2020 19:43
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [ee3ef95]
Page Load Metrics (393 ± 48 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint29393432
domContentLoaded2505853929948
load2515863939948
domInteractive2505843929948

@brad-decker brad-decker force-pushed the matomo-segment-holdover branch from ee3ef95 to f519f0f Compare October 21, 2020 20:11
Base automatically changed from share-segment-implementation to develop October 21, 2020 21:10
@brad-decker brad-decker force-pushed the matomo-segment-holdover branch from f519f0f to 432abeb Compare October 22, 2020 15:24
1. updates contexts/metametrics.js to create a thin wrapper around the trackEvent function created by getTrackMetaMetricsEvent function. This wrapper casts the old api calls to the new format so that we can quickly migrate analytics tracking from matomo to segment.
2. Removes metametrics.util.js as it is no longer used.
3. Removes background-metametrics.js as it is no longere used
4. Updates metamask-controller to call .trackMetaMetricsEvent directly instead of using the background-metametrics helper
5. updates share/modules/metametrics to conditionally call one of two segment instances depending on the existence of a new key in MetaMetricsEventPayload: matomoEvent. If matomoEvent is true, it'll route the call to a special source in Segment.
6. Added support for manually providing metaMetricsId to the trackEvent function. This is required when tracking the event properly after successfully opting in to the metametrics system.
7. Adds explicit handling for the 'isOptIn' config flag on trackEvent which will always track an event but will use the ANONYMOUS_ID if the user doesn't yet have a metaMetricsId
@brad-decker brad-decker force-pushed the matomo-segment-holdover branch from 432abeb to 844ea0c Compare October 22, 2020 17:08
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [4b7a398]
Page Load Metrics (416 ± 65 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint308241136
domContentLoaded26067841413665
load26167941613565
domInteractive26067841413665

@brad-decker brad-decker marked this pull request as ready for review October 22, 2020 18:31
@brad-decker brad-decker requested review from a team and kumavis as code owners October 22, 2020 18:31
@brad-decker brad-decker requested a review from Gudahtt October 22, 2020 19:06
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [93dc526]
Page Load Metrics (457 ± 61 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint308942178
domContentLoaded26577045512761
load26777145712761
domInteractive26577045512761

Copy link
Copy Markdown
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@brad-decker brad-decker merged commit 7d50357 into develop Oct 26, 2020
@brad-decker brad-decker deleted the matomo-segment-holdover branch October 26, 2020 19:05
@github-actions github-actions bot locked and limited conversation to collaborators Oct 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants