Merge pull request #612 from Safelite/feature/SSR-901
push siteType to GA
This commit is contained in:
commit
ee55d90711
4 changed files with 13 additions and 1 deletions
|
|
@ -100,6 +100,7 @@ export default {
|
|||
this.mainStore.issConfig.parentAccountNumber = data.parentAccountNumber;
|
||||
this.mainStore.issConfig.styleSheet = data.styleSheet;
|
||||
this.mainStore.issConfig.isCoverageEnabled = data.coverageEnabled;
|
||||
this.mainStore.issConfig.siteType = data.siteType;
|
||||
|
||||
try {
|
||||
if (data.clientFlags) {
|
||||
|
|
|
|||
|
|
@ -108,6 +108,12 @@ export default {
|
|||
this.logPageView(analyticsPageEvents.ENTRY);
|
||||
},
|
||||
|
||||
pushValueToGA() {
|
||||
pushToDataLayerIfDefined({
|
||||
siteType: useMainStore().issConfig.siteType
|
||||
});
|
||||
},
|
||||
|
||||
pushExperimentsToDataLayer() {
|
||||
const { experiments } = useMainStore().applicationUser;
|
||||
experiments?.forEach((exp) => {
|
||||
|
|
|
|||
|
|
@ -189,6 +189,9 @@ router.afterEach(async (to, from) => {
|
|||
|
||||
// Push experiments to Data Layer
|
||||
analyticsMixin.methods.pushExperimentsToDataLayer();
|
||||
|
||||
// Push values to GA
|
||||
analyticsMixin.methods.pushValueToGA();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -237,7 +237,8 @@ export const getDefaultState = () => ({
|
|||
policyNumber: null,
|
||||
policyZipCode: null,
|
||||
dateOfLoss: null
|
||||
}
|
||||
},
|
||||
siteType: null
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -1671,6 +1672,7 @@ export const useMainStore = defineStore({
|
|||
this.issConfig.disabledFields.policyNumber = false;
|
||||
this.issConfig.disabledFields.policyZipCode = false;
|
||||
this.issConfig.disabledFields.dateOfLoss = false;
|
||||
this.issConfig.siteType = null;
|
||||
},
|
||||
|
||||
disableKeyFields() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue