1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 19:26:13 +02:00
metamask-extension/app
Mark Stacey 426ddc8010 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 16:42:48 -03:00
..
_locales update email us to contact us (#9104) 2020-08-07 16:42:48 -03:00
fonts/Roboto remove superfulous fonts (#8954) 2020-07-10 10:42:59 -05:00
images Remove unused images (#8965) 2020-07-10 14:57:48 -02:30
manifest Version v8.0.6 2020-07-22 20:47:51 -03:00
scripts Remove url parameter from metricsEvent (#9157) 2020-08-07 16:42:48 -03:00
vendor/trezor Close window after opening fullscreen (#6966) 2019-08-08 11:50:32 -03:00
home.html Add optional portal to Popover component (#8253) 2020-03-30 18:25:17 -02:30
loading.html refactor & change html pages 2019-05-04 18:57:19 +02:00
notification.html Fix connection modal style issues (#8433) 2020-05-04 12:04:41 -03:00
phishing.html Backport "Updating deprecated Etherscam link (#7464)" (#8463) 2020-04-29 18:40:34 -03:00
popup.html Add optional portal to Popover component (#8253) 2020-03-30 18:25:17 -02:30
trezor-usb-permissions.html trezor v5 working on firefox 2018-08-05 02:43:02 -04:00