commit
3bfce275d5
1 changed files with 4 additions and 3 deletions
|
|
@ -6,12 +6,10 @@ import { analyticsPageEvents, GaCategories, GaActions, GaLabels, GaEvents } from
|
|||
|
||||
import baseMixin from "@/mixins/base-mixin";
|
||||
|
||||
// We will need current page name for multiple methods, define it once to re-use.
|
||||
const currentPageName = getPageNameByQueryString();
|
||||
|
||||
export default {
|
||||
methods: {
|
||||
logPageView(pageEvent) {
|
||||
const currentPageName = getPageNameByQueryString();
|
||||
var payload = {
|
||||
userId: getDeviceIdValue(),
|
||||
sessionKey: getSessionKeyValue(),
|
||||
|
|
@ -26,6 +24,7 @@ export default {
|
|||
},
|
||||
|
||||
logCustomEvent(category, action, label, value) {
|
||||
const currentPageName = getPageNameByQueryString();
|
||||
var payload = {
|
||||
userId: getDeviceIdValue(),
|
||||
sessionKey: getSessionKeyValue(),
|
||||
|
|
@ -42,6 +41,7 @@ export default {
|
|||
},
|
||||
|
||||
pushEventToGA(category, action, label, pushToLogApp = false) {
|
||||
const currentPageName = getPageNameByQueryString();
|
||||
const eventToBePushed = {
|
||||
'event': GaEvents.GENERIC_EVENT,
|
||||
'category': category,
|
||||
|
|
@ -60,6 +60,7 @@ export default {
|
|||
},
|
||||
|
||||
pushPageViewToGA() {
|
||||
const currentPageName = getPageNameByQueryString();
|
||||
const pageViewEvent = {
|
||||
'event': GaEvents.PAGE_VIEW_EVENT,
|
||||
'pagePath': `/fmg/?${queryStrings.FMG_PAGE}=${currentPageName}`,
|
||||
|
|
|
|||
Loading…
Reference in a new issue