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 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
..
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 Use pathname instead of URL for currentPath metrics parameter (#9158) 2020-08-07 15:32:46 -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