diff --git a/src/common-components/base-input-button/base-input-button.vue b/src/common-components/base-input-button/base-input-button.vue index d3574fef2..225363401 100644 --- a/src/common-components/base-input-button/base-input-button.vue +++ b/src/common-components/base-input-button/base-input-button.vue @@ -90,7 +90,7 @@ export default { this.groupName, false ); - // window.lastFocusedInputGroup = this.groupName; + this.pushClickEventToGA(); break; } @@ -126,17 +126,14 @@ export default { this.valueToEmit = this.value; } - // window.currentlySelectedValues = - // window.currentlySelectedValues ?? {}; this.dispatchStoreAction( gaStoreActions.UPDATE_CURRENTLY_SELECTED_VALUES, { groupName: this.groupName, value: this.value, }, - // false ); - // window.currentlySelectedValues[this.groupName] = this.value; + this.handleChange(this.valueToEmit); }, handleClick(e) { @@ -144,8 +141,6 @@ export default { this.$emit("buttonClicked", this.valueToEmit); }, pushClickEventToGA(value) { - // window.firedGaClickEventValues = - // window.firedGaClickEventValues ?? {}; const lastFocusedInputGroup = store.getters.gaClickInformation.lastFocusedInputGroup; this.dispatchStoreAction( @@ -154,10 +149,7 @@ export default { groupName: lastFocusedInputGroup, value: value ?? this.value, }, - // false ); - // window.firedGaClickEventValues[window.lastFocusedInputGroup] = - // value ?? this.value; this.pushEventToGA( this.$route.query[queryStrings.FMG_PAGE], @@ -178,8 +170,6 @@ export default { this.isMultiSelect, false ); - // window.lastFocusedInputGroup = this.groupName; - // window.wasLastFocusedInputMultiselect = this.isMultiSelect; }, handleKeyboardNavigation(key) { this.test(key); @@ -223,7 +213,7 @@ export default { this.groupName, false ); - // window.lastFocusedInputGroup = this.groupName; + if ( firedGaClickEventValues[lastFocusedInputGroup] != currentlySelectedValues[lastFocusedInputGroup] diff --git a/src/store/index.js b/src/store/index.js index 34bba86c0..cd2122ba9 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -1398,7 +1398,12 @@ export const actions = { // }); export default createStore({ - plugins: [createPersistedState()], + plugins: [createPersistedState({ + reducer: state => { + const { gaState, ...rest } = state + return rest + } + })], modules: { gaState, },