CASH-609 - Renamed getPageNameByQueryString method to getPageNameFromRouter as we are not using query string anymore
This commit is contained in:
parent
f35a2f2cdf
commit
19281c2e10
1 changed files with 7 additions and 7 deletions
|
|
@ -35,11 +35,11 @@ import router from "@/router";
|
||||||
export default {
|
export default {
|
||||||
methods: {
|
methods: {
|
||||||
getPageName() {
|
getPageName() {
|
||||||
return getPageNameByQueryString();
|
return getPageNameFromRouter();
|
||||||
},
|
},
|
||||||
|
|
||||||
async logPageView(pageEvent) {
|
async logPageView(pageEvent) {
|
||||||
const currentPageName = getPageNameByQueryString();
|
const currentPageName = getPageNameFromRouter();
|
||||||
await this.validateSession();
|
await this.validateSession();
|
||||||
|
|
||||||
const submittedOrder = baseMixin.methods.getSubmittedOrder();
|
const submittedOrder = baseMixin.methods.getSubmittedOrder();
|
||||||
|
|
@ -72,7 +72,7 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
async logCustomEvent(category, action, label, value) {
|
async logCustomEvent(category, action, label, value) {
|
||||||
const currentPageName = getPageNameByQueryString();
|
const currentPageName = getPageNameFromRouter();
|
||||||
await this.validateSession();
|
await this.validateSession();
|
||||||
|
|
||||||
const refSequenceNum =
|
const refSequenceNum =
|
||||||
|
|
@ -109,7 +109,7 @@ export default {
|
||||||
valueToLogType = null,
|
valueToLogType = null,
|
||||||
value = null
|
value = null
|
||||||
) {
|
) {
|
||||||
const currentPageName = getPageNameByQueryString();
|
const currentPageName = getPageNameFromRouter();
|
||||||
const labelToLog = getValueToLog(label, valueToLogType);
|
const labelToLog = getValueToLog(label, valueToLogType);
|
||||||
|
|
||||||
const eventToBePushed = {
|
const eventToBePushed = {
|
||||||
|
|
@ -129,7 +129,7 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
async pushEventForChatsToGA(category, action, label, pushToLogApp = false) {
|
async pushEventForChatsToGA(category, action, label, pushToLogApp = false) {
|
||||||
const currentPageName = getPageNameByQueryString();
|
const currentPageName = getPageNameFromRouter();
|
||||||
const value = `2.0_${currentPageName}`;
|
const value = `2.0_${currentPageName}`;
|
||||||
await this.pushEventToGA(category, action, label, pushToLogApp, null, value);
|
await this.pushEventToGA(category, action, label, pushToLogApp, null, value);
|
||||||
},
|
},
|
||||||
|
|
@ -139,7 +139,7 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
async pushPageViewToGA() {
|
async pushPageViewToGA() {
|
||||||
const currentPageName = getPageNameByQueryString();
|
const currentPageName = getPageNameFromRouter();
|
||||||
const pageViewEvent = {
|
const pageViewEvent = {
|
||||||
event: GaEvents.PAGE_VIEW_EVENT,
|
event: GaEvents.PAGE_VIEW_EVENT,
|
||||||
pagePath: `/fmg/${currentPageName}`,
|
pagePath: `/fmg/${currentPageName}`,
|
||||||
|
|
@ -804,7 +804,7 @@ function pushToDataLayerIfDefined(data) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getPageNameByQueryString() {
|
function getPageNameFromRouter() {
|
||||||
if (
|
if (
|
||||||
router &&
|
router &&
|
||||||
router.currentRoute &&
|
router.currentRoute &&
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue