1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
metamask-extension/ui/app/pages
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
..
add-token Narrow usages of 037DD6 to 'primary-blue' (#9008) 2020-07-17 13:11:04 -05:00
asset Uncomment and fix all auto-fixable stylelint rules (#8989) 2020-07-15 10:13:40 -03:00
confirm-add-suggested-token Use eslint@6.8.0 (#8978) 2020-07-14 12:50:41 -02:30
confirm-add-token Uncomment and fix all auto-fixable stylelint rules (#8989) 2020-07-15 10:13:40 -03:00
confirm-approve Update font family globally (#9073) 2020-07-29 15:04:02 -05:00
confirm-decrypt-message trim unused account-list-item code and co-locate styles (#9116) 2020-08-06 08:04:55 -05:00
confirm-deploy-contract Enable arrow-parens ESLint rule 2020-02-15 17:04:21 -03:30
confirm-encryption-public-key trim unused account-list-item code and co-locate styles (#9116) 2020-08-06 08:04:55 -05:00
confirm-send-ether Use eslint@6.8.0 (#8978) 2020-07-14 12:50:41 -02:30
confirm-send-token Use eslint@6.8.0 (#8978) 2020-07-14 12:50:41 -02:30
confirm-token-transaction-base Use eslint@6.8.0 (#8978) 2020-07-14 12:50:41 -02:30
confirm-transaction Use eslint@6.8.0 (#8978) 2020-07-14 12:50:41 -02:30
confirm-transaction-base Use eslint@6.8.0 (#8978) 2020-07-14 12:50:41 -02:30
confirm-transaction-switch Add MESSAGE_TYPE enum (#8743) 2020-06-04 16:22:45 -03:00
connected-accounts Narrow usages of 037DD6 to 'primary-blue' (#9008) 2020-07-17 13:11:04 -05:00
connected-sites Narrow usages of 037DD6 to 'primary-blue' (#9008) 2020-07-17 13:11:04 -05:00
create-account Use eslint@6.8.0 (#8978) 2020-07-14 12:50:41 -02:30
error Update font family globally (#9073) 2020-07-29 15:04:02 -05:00
first-time-flow Update font family globally (#9073) 2020-07-29 15:04:02 -05:00
home Use mixins for typography instead of placeholder selectors (#9072) 2020-07-29 10:35:53 -05:00
keychains Update font family globally (#9073) 2020-07-29 15:04:02 -05:00
lock Use eslint@6.8.0 (#8978) 2020-07-14 12:50:41 -02:30
mobile-sync remove unused section scss (#9146) 2020-08-07 10:58:48 -05:00
permissions-connect Use mixins for typography instead of placeholder selectors (#9072) 2020-07-29 10:35:53 -05:00
routes Remove url parameter from metricsEvent (#9157) 2020-08-07 14:57:27 -03:00
send trim unused account-list-item code and co-locate styles (#9116) 2020-08-06 08:04:55 -05:00
settings update email us to contact us (#9104) 2020-07-29 16:05:19 -05:00
unlock-page Fix words (#9038) 2020-07-20 14:32:49 -02:30
index.js Use createContext for metametrics context (preserve legacy context) (#8540) 2020-05-08 11:41:43 -05:00
index.scss Uncomment and fix all auto-fixable stylelint rules (#8989) 2020-07-15 10:13:40 -03:00