Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions default/src/app/search/search.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export class SearchComponent {
doSearch(searchField: any) {
this.queryService.doQuery(searchField, 'site-search').subscribe(
data => {
ga('send', 'event', 'Search', 'source', 'site-search');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would move these to before the the doQuery()

// If when data is returned from a query with a redirect set, do the redirect.
if (data['payload']['redirect']) {
this._redirect(data['payload']['redirect']);
Expand All @@ -67,6 +68,7 @@ export class SearchComponent {
if (parameters['q'] != null) {
this.queryService.doQuery(parameters['q'], 'omnibox').subscribe(
response => {
ga('send', 'event', 'Search', 'source', 'omnibox');
return;
}, error => {
console.log('Error happened: ' + error);
Expand Down