{"action":"closed","number":837,"pull_request":{"url":"https://api.github.com/repos/alphagov/frontend/pulls/837","id":40025258,"html_url":"https://github.com/alphagov/frontend/pull/837","diff_url":"https://github.com/alphagov/frontend/pull/837.diff","patch_url":"https://github.com/alphagov/frontend/pull/837.patch","issue_url":"https://api.github.com/repos/alphagov/frontend/issues/837","number":837,"state":"closed","locked":false,"title":"Log search with zero results and suggestion","user":{"login":"jackscotti","id":5038475,"avatar_url":"https://avatars.githubusercontent.com/u/5038475?v=3","gravatar_id":"","url":"https://api.github.com/users/jackscotti","html_url":"https://github.com/jackscotti","followers_url":"https://api.github.com/users/jackscotti/followers","following_url":"https://api.github.com/users/jackscotti/following{/other_user}","gists_url":"https://api.github.com/users/jackscotti/gists{/gist_id}","starred_url":"https://api.github.com/users/jackscotti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jackscotti/subscriptions","organizations_url":"https://api.github.com/users/jackscotti/orgs","repos_url":"https://api.github.com/users/jackscotti/repos","events_url":"https://api.github.com/users/jackscotti/events{/privacy}","received_events_url":"https://api.github.com/users/jackscotti/received_events","type":"User","site_admin":false},"body":"If a search returns no results, but does have a spelling suggestion, a searchResults event should be sent to GA including the spellingSuggestions (but no urls). Currently, no event is sent to GA in this case.\r\n\r\nTicket: https://trello.com/c/zJ5wo5rc/183-no-results-logged-for-a-search-with-a-suggestion-but-0-results\r\n\r\n~~PS: I've added an empty string for the suggestion parameter for searchResultData, this because I did not want to overcomplicate the IF clause in trackSearchResultsAndSuggestions. I am assuming that an empty string sent to GA is not going to be logged. Am I right? If not, I can renounce to this modification and make that IF clause even uglier.~~ (see comments)\r\n\r\nPPS: this is the first time I write JS for GOV.UK. Be nice. :metal:\r\n","created_at":"2015-07-15T13:58:47Z","updated_at":"2015-07-15T14:39:16Z","closed_at":"2015-07-15T14:39:16Z","merged_at":"2015-07-15T14:39:16Z","merge_commit_sha":"7266a28a1070e21d40560fedbabd37ed1bb69346","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/alphagov/frontend/pulls/837/commits","review_comments_url":"https://api.github.com/repos/alphagov/frontend/pulls/837/comments","review_comment_url":"https://api.github.com/repos/alphagov/frontend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alphagov/frontend/issues/837/comments","statuses_url":"https://api.github.com/repos/alphagov/frontend/statuses/dbd0180b220b4add4e9a7edc768c4ac645beb058","head":{"label":"alphagov:log_search_with_zero_results_and_suggestion","ref":"log_search_with_zero_results_and_suggestion","sha":"dbd0180b220b4add4e9a7edc768c4ac645beb058","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":2331534,"name":"frontend","full_name":"alphagov/frontend","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/frontend","description":"Front-end (and preview) site for single domain","fork":false,"url":"https://api.github.com/repos/alphagov/frontend","forks_url":"https://api.github.com/repos/alphagov/frontend/forks","keys_url":"https://api.github.com/repos/alphagov/frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/frontend/teams","hooks_url":"https://api.github.com/repos/alphagov/frontend/hooks","issue_events_url":"https://api.github.com/repos/alphagov/frontend/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/frontend/events","assignees_url":"https://api.github.com/repos/alphagov/frontend/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/frontend/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/frontend/tags","blobs_url":"https://api.github.com/repos/alphagov/frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/frontend/languages","stargazers_url":"https://api.github.com/repos/alphagov/frontend/stargazers","contributors_url":"https://api.github.com/repos/alphagov/frontend/contributors","subscribers_url":"https://api.github.com/repos/alphagov/frontend/subscribers","subscription_url":"https://api.github.com/repos/alphagov/frontend/subscription","commits_url":"https://api.github.com/repos/alphagov/frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/frontend/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/frontend/merges","archive_url":"https://api.github.com/repos/alphagov/frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/frontend/downloads","issues_url":"https://api.github.com/repos/alphagov/frontend/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/frontend/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/frontend/releases{/id}","created_at":"2011-09-06T00:16:08Z","updated_at":"2015-07-13T03:37:59Z","pushed_at":"2015-07-15T14:39:16Z","git_url":"git://github.com/alphagov/frontend.git","ssh_url":"git@github.com:alphagov/frontend.git","clone_url":"https://github.com/alphagov/frontend.git","svn_url":"https://github.com/alphagov/frontend","homepage":"","size":36287,"stargazers_count":206,"watchers_count":206,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":36,"mirror_url":null,"open_issues_count":2,"forks":36,"open_issues":2,"watchers":206,"default_branch":"master"}},"base":{"label":"alphagov:master","ref":"master","sha":"36c513bb05ac38f900f3c12ac6b304bb17b62eb9","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":2331534,"name":"frontend","full_name":"alphagov/frontend","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/frontend","description":"Front-end (and preview) site for single domain","fork":false,"url":"https://api.github.com/repos/alphagov/frontend","forks_url":"https://api.github.com/repos/alphagov/frontend/forks","keys_url":"https://api.github.com/repos/alphagov/frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/frontend/teams","hooks_url":"https://api.github.com/repos/alphagov/frontend/hooks","issue_events_url":"https://api.github.com/repos/alphagov/frontend/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/frontend/events","assignees_url":"https://api.github.com/repos/alphagov/frontend/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/frontend/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/frontend/tags","blobs_url":"https://api.github.com/repos/alphagov/frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/frontend/languages","stargazers_url":"https://api.github.com/repos/alphagov/frontend/stargazers","contributors_url":"https://api.github.com/repos/alphagov/frontend/contributors","subscribers_url":"https://api.github.com/repos/alphagov/frontend/subscribers","subscription_url":"https://api.github.com/repos/alphagov/frontend/subscription","commits_url":"https://api.github.com/repos/alphagov/frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/frontend/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/frontend/merges","archive_url":"https://api.github.com/repos/alphagov/frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/frontend/downloads","issues_url":"https://api.github.com/repos/alphagov/frontend/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/frontend/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/frontend/releases{/id}","created_at":"2011-09-06T00:16:08Z","updated_at":"2015-07-13T03:37:59Z","pushed_at":"2015-07-15T14:39:16Z","git_url":"git://github.com/alphagov/frontend.git","ssh_url":"git@github.com:alphagov/frontend.git","clone_url":"https://github.com/alphagov/frontend.git","svn_url":"https://github.com/alphagov/frontend","homepage":"","size":36287,"stargazers_count":206,"watchers_count":206,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":36,"mirror_url":null,"open_issues_count":2,"forks":36,"open_issues":2,"watchers":206,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alphagov/frontend/pulls/837"},"html":{"href":"https://github.com/alphagov/frontend/pull/837"},"issue":{"href":"https://api.github.com/repos/alphagov/frontend/issues/837"},"comments":{"href":"https://api.github.com/repos/alphagov/frontend/issues/837/comments"},"review_comments":{"href":"https://api.github.com/repos/alphagov/frontend/pulls/837/comments"},"review_comment":{"href":"https://api.github.com/repos/alphagov/frontend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alphagov/frontend/pulls/837/commits"},"statuses":{"href":"https://api.github.com/repos/alphagov/frontend/statuses/dbd0180b220b4add4e9a7edc768c4ac645beb058"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"edds","id":35035,"avatar_url":"https://avatars.githubusercontent.com/u/35035?v=3","gravatar_id":"","url":"https://api.github.com/users/edds","html_url":"https://github.com/edds","followers_url":"https://api.github.com/users/edds/followers","following_url":"https://api.github.com/users/edds/following{/other_user}","gists_url":"https://api.github.com/users/edds/gists{/gist_id}","starred_url":"https://api.github.com/users/edds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edds/subscriptions","organizations_url":"https://api.github.com/users/edds/orgs","repos_url":"https://api.github.com/users/edds/repos","events_url":"https://api.github.com/users/edds/events{/privacy}","received_events_url":"https://api.github.com/users/edds/received_events","type":"User","site_admin":false},"comments":3,"review_comments":2,"commits":2,"additions":56,"deletions":5,"changed_files":2}}