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 8713927e5e
Remove url parameter from metricsEvent (#9157)
* Remove `url` parameter from `metricsEvent`

The `url` parameter was used to override the `currentPath`, but it
never worked correctly. It was supposed to be used for setting the
`url` query parameter that was sent to Matomo, but `currentPath` was
always used even if it `url` was set and `currentPath` was empty.

Instead, `currentPath` is now always used. There was never a need to
provide an "override" for `currentPath` when it can be set directly.
The metrics provider does set `currentPath` automatically by default,
but this can be overwritten already by passing a second parameter to
`metricsEvent`.

There were two places this `url` parameter was being used: background
events, and path changes. Background events were submitted with no
`currentPath`, so because of the bug with the `url` parameter, the
metrics utility would crash upon each event. So those were never
actually sent. This commit will fix that crash.

The `currentPath` parameter was supplied as an empty string for the
path change events, so those never crashed. They just had the `url`
query string parameter set incorrectly (to an empty string). It should
now be correctly populated, which should mean we'll be capturing all
path changes now. Previously we were only capturing path changes to
pages that happened to include an event, because of this blank `url`
problem.

* Use `url` query parameter as fallback for generating `pv_id`

The `pv_id` parameter currently isn't generated correctly on Firefox,
as the generation assumes that the current URL starts with
`chrome-extension://`. The `url` query parameter is still unique for
each path, so it's probably good enough for generating an id for each
page.

This is just a temporary fix; it will be removed in a future PR, where
Firefox will be properly supported.
2020-08-07 14:57:27 -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 Remove url parameter from metricsEvent (#9157) 2020-08-07 14:57:27 -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