aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/helpers/utils/metametrics.util.js
diff options
context:
space:
mode:
authorDan Finlay <542863+danfinlay@users.noreply.github.com>2019-05-15 04:22:54 +0800
committerGitHub <noreply@github.com>2019-05-15 04:22:54 +0800
commitbf5b7f8e77684ce4a66d7e0301ed19d048a545f9 (patch)
tree9c68af7d6cb4b10410d5deeb33b9c9b61996cd02 /ui/app/helpers/utils/metametrics.util.js
parent7dcc707a4329d69e9d4d7c6befbfd228ed7d714b (diff)
parent985f51a764560311e8aa5bb149e34b3c25b78c92 (diff)
downloadtangerine-wallet-browser-bf5b7f8e77684ce4a66d7e0301ed19d048a545f9.tar
tangerine-wallet-browser-bf5b7f8e77684ce4a66d7e0301ed19d048a545f9.tar.gz
tangerine-wallet-browser-bf5b7f8e77684ce4a66d7e0301ed19d048a545f9.tar.bz2
tangerine-wallet-browser-bf5b7f8e77684ce4a66d7e0301ed19d048a545f9.tar.lz
tangerine-wallet-browser-bf5b7f8e77684ce4a66d7e0301ed19d048a545f9.tar.xz
tangerine-wallet-browser-bf5b7f8e77684ce4a66d7e0301ed19d048a545f9.tar.zst
tangerine-wallet-browser-bf5b7f8e77684ce4a66d7e0301ed19d048a545f9.zip
Merge pull request #6599 from MetaMask/develop
Master Version Bump (v6.5.0)
Diffstat (limited to 'ui/app/helpers/utils/metametrics.util.js')
-rw-r--r--ui/app/helpers/utils/metametrics.util.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/ui/app/helpers/utils/metametrics.util.js b/ui/app/helpers/utils/metametrics.util.js
index 5ae3e8937..cafbd5c07 100644
--- a/ui/app/helpers/utils/metametrics.util.js
+++ b/ui/app/helpers/utils/metametrics.util.js
@@ -84,7 +84,7 @@ function composeParamAddition (paramValue, paramName) {
: `&${paramName}=${paramValue}`
}
-function composeUrl (config, permissionPreferences = {}) {
+function composeUrl (config) {
const {
eventOpts = {},
customVariables = '',
@@ -124,10 +124,10 @@ function composeUrl (config, permissionPreferences = {}) {
numberOfTokens: customVariables && customVariables.numberOfTokens || numberOfTokens,
numberOfAccounts: customVariables && customVariables.numberOfAccounts || numberOfAccounts,
}) : ''
- const url = configUrl || `&url=${encodeURIComponent(currentPath.replace(/chrome-extension:\/\/\w+/, METAMETRICS_TRACKING_URL))}`
+ const url = configUrl || currentPath ? `&url=${encodeURIComponent(currentPath.replace(/chrome-extension:\/\/\w+/, METAMETRICS_TRACKING_URL))}` : ''
const _id = metaMetricsId && !excludeMetaMetricsId ? `&_id=${metaMetricsId.slice(2, 18)}` : ''
const rand = `&rand=${String(Math.random()).slice(2)}`
- const pv_id = `&pv_id=${ethUtil.bufferToHex(ethUtil.sha3(url || currentPath.match(/chrome-extension:\/\/\w+\/(.+)/)[0])).slice(2, 8)}`
+ const pv_id = (url || currentPath) && `&pv_id=${ethUtil.bufferToHex(ethUtil.sha3(url || currentPath.match(/chrome-extension:\/\/\w+\/(.+)/)[0])).slice(2, 8)}` || ''
const uid = metaMetricsId && !excludeMetaMetricsId
? `&uid=${metaMetricsId.slice(2, 18)}`
: excludeMetaMetricsId