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 {
|
||||
methods: {
|
||||
getPageName() {
|
||||
return getPageNameByQueryString();
|
||||
return getPageNameFromRouter();
|
||||
},
|
||||
|
||||
async logPageView(pageEvent) {
|
||||
const currentPageName = getPageNameByQueryString();
|
||||
const currentPageName = getPageNameFromRouter();
|
||||
await this.validateSession();
|
||||
|
||||
const submittedOrder = baseMixin.methods.getSubmittedOrder();
|
||||
|
|
@ -72,7 +72,7 @@ export default {
|
|||
},
|
||||
|
||||
async logCustomEvent(category, action, label, value) {
|
||||
const currentPageName = getPageNameByQueryString();
|
||||
const currentPageName = getPageNameFromRouter();
|
||||
await this.validateSession();
|
||||
|
||||
const refSequenceNum =
|
||||
|
|
@ -109,7 +109,7 @@ export default {
|
|||
valueToLogType = null,
|
||||
value = null
|
||||
) {
|
||||
const currentPageName = getPageNameByQueryString();
|
||||
const currentPageName = getPageNameFromRouter();
|
||||
const labelToLog = getValueToLog(label, valueToLogType);
|
||||
|
||||
const eventToBePushed = {
|
||||
|
|
@ -129,7 +129,7 @@ export default {
|
|||
},
|
||||
|
||||
async pushEventForChatsToGA(category, action, label, pushToLogApp = false) {
|
||||
const currentPageName = getPageNameByQueryString();
|
||||
const currentPageName = getPageNameFromRouter();
|
||||
const value = `2.0_${currentPageName}`;
|
||||
await this.pushEventToGA(category, action, label, pushToLogApp, null, value);
|
||||
},
|
||||
|
|
@ -139,7 +139,7 @@ export default {
|
|||
},
|
||||
|
||||
async pushPageViewToGA() {
|
||||
const currentPageName = getPageNameByQueryString();
|
||||
const currentPageName = getPageNameFromRouter();
|
||||
const pageViewEvent = {
|
||||
event: GaEvents.PAGE_VIEW_EVENT,
|
||||
pagePath: `/fmg/${currentPageName}`,
|
||||
|
|
@ -804,7 +804,7 @@ function pushToDataLayerIfDefined(data) {
|
|||
}
|
||||
}
|
||||
|
||||
function getPageNameByQueryString() {
|
||||
function getPageNameFromRouter() {
|
||||
if (
|
||||
router &&
|
||||
router.currentRoute &&
|
||||
|
|
|
|||
Loading…
Reference in a new issue