CSR-1439 remove params from endpoint logging
This commit is contained in:
parent
5d17ff3af0
commit
129cccaa58
2 changed files with 13 additions and 1 deletions
|
|
@ -39,9 +39,10 @@ export default {
|
||||||
}
|
}
|
||||||
const pageName = analyticsMixIn.methods.getPageName();
|
const pageName = analyticsMixIn.methods.getPageName();
|
||||||
const nextPageName = router.lastNavigationPage || pageName;
|
const nextPageName = router.lastNavigationPage || pageName;
|
||||||
|
const endpointWithoutParams = analyticsMixIn.methods.removeParamsFromEndpoint(endpoint);
|
||||||
analyticsMixIn.methods.pushEventToGA(
|
analyticsMixIn.methods.pushEventToGA(
|
||||||
GaCategories.API_RESPONSE,
|
GaCategories.API_RESPONSE,
|
||||||
`${nextPageName}_${endpoint}`,
|
`${nextPageName}_${endpointWithoutParams}`,
|
||||||
`${GaLabels.SUCCESS}${additionalEventData}`,
|
`${GaLabels.SUCCESS}${additionalEventData}`,
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -176,6 +176,17 @@ export default {
|
||||||
getSessionIdValue() === "00000000-0000-0000-0000-000000000000"
|
getSessionIdValue() === "00000000-0000-0000-0000-000000000000"
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
removeParamsFromEndpoint(endpoint) {
|
||||||
|
const numSlashesBeforeParams = 6;
|
||||||
|
let splitString = endpoint.split('/');
|
||||||
|
if (splitString.length > numSlashesBeforeParams) {
|
||||||
|
splitString = splitString.slice(0, numSlashesBeforeParams);
|
||||||
|
return splitString.join('/');
|
||||||
|
} else {
|
||||||
|
return endpoint;
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
analyticsPageEvents() {
|
analyticsPageEvents() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue