CSR-1439 formatting
This commit is contained in:
parent
129cccaa58
commit
71e57c2aa5
2 changed files with 4 additions and 3 deletions
|
|
@ -39,7 +39,8 @@ 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);
|
const endpointWithoutParams =
|
||||||
|
analyticsMixIn.methods.removeParamsFromEndpoint(endpoint);
|
||||||
analyticsMixIn.methods.pushEventToGA(
|
analyticsMixIn.methods.pushEventToGA(
|
||||||
GaCategories.API_RESPONSE,
|
GaCategories.API_RESPONSE,
|
||||||
`${nextPageName}_${endpointWithoutParams}`,
|
`${nextPageName}_${endpointWithoutParams}`,
|
||||||
|
|
|
||||||
|
|
@ -179,10 +179,10 @@ export default {
|
||||||
|
|
||||||
removeParamsFromEndpoint(endpoint) {
|
removeParamsFromEndpoint(endpoint) {
|
||||||
const numSlashesBeforeParams = 6;
|
const numSlashesBeforeParams = 6;
|
||||||
let splitString = endpoint.split('/');
|
let splitString = endpoint.split("/");
|
||||||
if (splitString.length > numSlashesBeforeParams) {
|
if (splitString.length > numSlashesBeforeParams) {
|
||||||
splitString = splitString.slice(0, numSlashesBeforeParams);
|
splitString = splitString.slice(0, numSlashesBeforeParams);
|
||||||
return splitString.join('/');
|
return splitString.join("/");
|
||||||
} else {
|
} else {
|
||||||
return endpoint;
|
return endpoint;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue