push siteType to GA

This commit is contained in:
Katie Kroell 2024-04-09 16:58:58 -04:00
parent ed91cfa519
commit 83a9dcf63d
4 changed files with 12 additions and 1 deletions

View file

@ -61,6 +61,7 @@ export default {
if (clientTagPresent) { if (clientTagPresent) {
const resp = await validateISSClientTag(clientTag); const resp = await validateISSClientTag(clientTag);
this.mainStore.issConfig.siteType = resp.data.siteType;
if (resp?.data.active && resp?.data.accountName.length > 0) { if (resp?.data.active && resp?.data.accountName.length > 0) {
if (resp.data.authentication === 'RSAToken') { if (resp.data.authentication === 'RSAToken') {

View file

@ -108,6 +108,12 @@ export default {
this.logPageView(analyticsPageEvents.ENTRY); this.logPageView(analyticsPageEvents.ENTRY);
}, },
pushValueToGA() {
pushToDataLayerIfDefined({
siteType: useMainStore().issConfig.siteType
});
},
pushExperimentsToDataLayer() { pushExperimentsToDataLayer() {
const { experiments } = useMainStore().applicationUser; const { experiments } = useMainStore().applicationUser;
experiments?.forEach((exp) => { experiments?.forEach((exp) => {

View file

@ -189,6 +189,9 @@ router.afterEach(async (to, from) => {
// Push experiments to Data Layer // Push experiments to Data Layer
analyticsMixin.methods.pushExperimentsToDataLayer(); analyticsMixin.methods.pushExperimentsToDataLayer();
// Push values to GA
analyticsMixin.methods.pushValueToGA();
} }
}); });

View file

@ -237,7 +237,8 @@ export const getDefaultState = () => ({
policyNumber: null, policyNumber: null,
policyZipCode: null, policyZipCode: null,
dateOfLoss: null dateOfLoss: null
} },
siteType: null
} }
}); });