1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
metamask-extension/app/scripts/lib
Mark Stacey 1419c14fb6
Use pathname instead of URL for currentPath metrics parameter (#9158)
The `currentPath` parameter passed to our metrics utility had been
passed the full URL rather than just the path, contrary to what the
name would imply. We only used the path portion, so passing the full
URL did lead to complications.

Now just the `pathname` is passed in, rather than the full URL. This
simplifies the metrics logic, and it incidentally fixes two bugs.

The main bug fixed is regarding Firefox metrics. Previously we had
assumed the `currentPath` would start with `chrome-extension://`, which
of course was not true on Firefox. This lead to us incorrectly parsing
the `currentPath`, so path tracking was broken for Firefox events.
This broken parsing is now bypassed entirely, so metrics should now
work the same on Firefox as on Chrome.

The second bug was that we were incorrectly setting the tracking URL
for background events during tests. As a result, we were incorrectly
detecting ourselves as an internal site that had referred the user to
us. But this was not of major concern, since it only affected test
metrics (which get sent to the development Matomo project).

Lastly, this change let us discard the `pathname` parameter used in
the `overrides` parameter of the `metricsEvent` function. Now that
`currentPath` is equivalent to `pathname`, the `pathname` parameter is
redundant.
2020-08-07 15:32:46 -03:00
..
ens-ipfs Use string network and chain IDs (#8628) 2020-07-08 14:05:09 -07:00
migrator Enable guard-for-in rule (#9000) 2020-07-21 18:40:45 -02:30
account-tracker.js Clear AccountTracker accounts and CachedBalances on createNewVaultAndRestore (#9023) 2020-07-16 19:09:38 -07:00
auto-reload.js Update inpage provider, deprecation warnings (#8854) 2020-06-24 15:21:57 -07:00
backend-metametrics.js Use pathname instead of URL for currentPath metrics parameter (#9158) 2020-08-07 15:32:46 -03:00
buy-eth-url.js Move export defaults statements alongside their objects (#8525) 2020-05-05 19:49:38 -02:30
cleanErrorStack.js Move export defaults statements alongside their objects (#8525) 2020-05-05 19:49:38 -02:30
ComposableObservableStore.js Enable guard-for-in rule (#9000) 2020-07-21 18:40:45 -02:30
createLoggerMiddleware.js Move export defaults statements alongside their objects (#8525) 2020-05-05 19:49:38 -02:30
createOnboardingMiddleware.js Move export defaults statements alongside their objects (#8525) 2020-05-05 19:49:38 -02:30
createOriginMiddleware.js Move export defaults statements alongside their objects (#8525) 2020-05-05 19:49:38 -02:30
createStreamSink.js Fix words (#9038) 2020-07-20 14:32:49 -02:30
createTabIdMiddleware.js Move export defaults statements alongside their objects (#8525) 2020-05-05 19:49:38 -02:30
decrypt-message-manager.js Fix words (#9038) 2020-07-20 14:32:49 -02:30
encryption-public-key-manager.js Return after 'reject' in Promise constructor (#8857) 2020-06-24 16:38:53 -03:00
enums.js Add MESSAGE_TYPE enum (#8743) 2020-06-04 16:22:45 -03:00
extractEthjsErrorMessage.js Move export defaults statements alongside their objects (#8525) 2020-05-05 19:49:38 -02:30
fetch-with-timeout.js Prevent accidental use of globals (#8340) 2020-04-15 14:23:27 -03:00
freezeGlobals.js Consistent jsdoc syntax (#7755) 2020-01-13 14:36:36 -04:00
get-first-preferred-lang-code.js Use eslint@6.8.0 (#8978) 2020-07-14 12:50:41 -02:30
getObjStructure.js Move export defaults statements alongside their objects (#8525) 2020-05-05 19:49:38 -02:30
local-store.js Consistent jsdoc syntax (#7755) 2020-01-13 14:36:36 -04:00
message-manager.js Fix words (#9038) 2020-07-20 14:32:49 -02:30
network-store.js Move export defaults statements alongside their objects (#8525) 2020-05-05 19:49:38 -02:30
nodeify.js Consistent jsdoc syntax (#7755) 2020-01-13 14:36:36 -04:00
notification-manager.js Fix popup/notification when browser is in fullscreen, primarily on macOS. (#9075) 2020-07-27 11:33:25 -07:00
personal-message-manager.js Fix words (#9038) 2020-07-20 14:32:49 -02:30
random-id.js Move export defaults statements alongside their objects (#8525) 2020-05-05 19:49:38 -02:30
seed-phrase-verifier.js Use async/await for seedPhraseVerifier.verifyAccounts (#9100) 2020-07-29 19:50:38 -02:30
select-chain-id.js Cleanup network enums (#8627) 2020-05-20 08:57:45 -07:00
setupFetchDebugging.js Move export defaults statements alongside their objects (#8525) 2020-05-05 19:49:38 -02:30
setupSentry.js Use environment variable for production Sentry DSN (#9097) 2020-07-29 13:14:08 -03:00
stream-utils.js Use eslint@6.8.0 (#8978) 2020-07-14 12:50:41 -02:30
typed-message-manager.js Use eslint@6.8.0 (#8978) 2020-07-14 12:50:41 -02:30
util.js Fix words (#9038) 2020-07-20 14:32:49 -02:30