Skip to content
Snippets Groups Projects

Resolve "Add missing snowplow tracking to primary navigation"

All threads resolved!
@@ -164,13 +164,17 @@ export default {
@@ -164,13 +164,17 @@ export default {
...mapActions(['setSearch', 'fetchAutocompleteOptions', 'clearAutocomplete']),
...mapActions(['setSearch', 'fetchAutocompleteOptions', 'clearAutocomplete']),
openDropdown() {
openDropdown() {
this.showDropdown = true;
this.showDropdown = true;
this.isFocused = true;
this.$emit('expandSearchBar', true);
Tracking.event(undefined, 'focus_input', {
// check isFocused state to avoid firing duplicate events
label: 'global_search',
if (!this.isFocused) {
property: 'top_navigation',
this.isFocused = true;
});
this.$emit('expandSearchBar', true);
 
 
Tracking.event(undefined, 'focus_input', {
 
label: 'global_search',
 
property: 'top_navigation',
 
});
 
}
},
},
closeDropdown() {
closeDropdown() {
this.showDropdown = false;
this.showDropdown = false;
Loading