chore: Add an event for conversation filter (#6306)

This commit is contained in:
Pranav Raj S
2023-01-19 14:07:02 -08:00
committed by GitHub
parent a745068473
commit 3b1036e3d6
2 changed files with 9 additions and 0 deletions

View File

@@ -61,6 +61,7 @@ import { mapGetters } from 'vuex';
import { filterAttributeGroups } from './advancedFilterItems';
import filterMixin from 'shared/mixins/filterMixin';
import * as OPERATORS from 'dashboard/components/widgets/FilterInput/FilterOperatorTypes.js';
import { CONVERSATION_EVENTS } from '../../../helper/AnalyticsHelper/events';
export default {
components: {
@@ -287,6 +288,12 @@ export default {
JSON.parse(JSON.stringify(this.appliedFilters))
);
this.$emit('applyFilter', this.appliedFilters);
this.$track(CONVERSATION_EVENTS.APPLY_FILTER, {
applied_filters: this.appliedFilters.map(filter => ({
key: filter.attribute_key,
operator: filter.filter_operator,
})),
});
},
resetFilter(index, currentFilter) {
this.appliedFilters[index].filter_operator = this.filterTypes.find(

View File

@@ -4,6 +4,8 @@ export const CONVERSATION_EVENTS = Object.freeze({
SENT_PRIVATE_NOTE: 'Sent a private note',
INSERTED_A_CANNED_RESPONSE: 'Inserted a canned response',
USED_MENTIONS: 'Used mentions',
APPLY_FILTER: 'Applied filters in the conversation list',
});
export const ACCOUNT_EVENTS = Object.freeze({