{"action":"created","comment":{"url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/comments/61971312","id":61971312,"diff_hunk":"@@ -81,6 +81,56 @@ const EVENTS = {\n \t\t\t\t'calypso_domain_search',\n \t\t\t\t{\n \t\t\t\t\tsearch_box_value: searchBoxValue,\n+\t\t\t\t\ttime_diff_from_last_search: timeDiffFromLastSearch,\n+\t\t\t\t\tsearch_count: searchCount,\n+\t\t\t\t\tsection\n+\t\t\t\t}\n+\t\t\t);\n+\t\t},\n+\n+\t\tsearchFormView( section ) {\n+\t\t\tanalytics.ga.recordEvent(\n+\t\t\t\t'Domain Search',\n+\t\t\t\t'Landed on Search'\n+\t\t\t);\n+\n+\t\t\tanalytics.tracks.recordEvent( 'calypso_domain_search_pageview', { section } );\n+\t\t},\n+\n+\t\tsearchResultsReceive( searchQuery, searchResults, responseTimeInMs, resultCount, section ) {\n+\t\t\tanalytics.ga.recordEvent(\n+\t\t\t\t'Domain Search',\n+\t\t\t\t'Receive Results',\n+\t\t\t\t'Response Time',\n+\t\t\t\tresponseTimeInMs\n+\t\t\t);\n+\n+\t\t\tanalytics.tracks.recordEvent(\n+\t\t\t\t'calypso_domain_search_results_suggestions_receive',\n+\t\t\t\t{\n+\t\t\t\t\tsearch_query: searchQuery,\n+\t\t\t\t\tresults: searchResults.map( result => result.domain_name ).join( ';' ),","path":"client/lib/mixins/analytics/index.js","position":41,"original_position":41,"commit_id":"a444df50bbbd451cd78239cfecbd973d8f0ad2e1","original_commit_id":"a444df50bbbd451cd78239cfecbd973d8f0ad2e1","user":{"login":"klimeryk","id":3392497,"avatar_url":"https://avatars.githubusercontent.com/u/3392497?v=3","gravatar_id":"","url":"https://api.github.com/users/klimeryk","html_url":"https://github.com/klimeryk","followers_url":"https://api.github.com/users/klimeryk/followers","following_url":"https://api.github.com/users/klimeryk/following{/other_user}","gists_url":"https://api.github.com/users/klimeryk/gists{/gist_id}","starred_url":"https://api.github.com/users/klimeryk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klimeryk/subscriptions","organizations_url":"https://api.github.com/users/klimeryk/orgs","repos_url":"https://api.github.com/users/klimeryk/repos","events_url":"https://api.github.com/users/klimeryk/events{/privacy}","received_events_url":"https://api.github.com/users/klimeryk/received_events","type":"User","site_admin":false},"body":"If you pass it an error from the backend (as you do [above](https://github.com/Automattic/wp-calypso/pull/5100/files#diff-99f1f1d8ba147cd06cfd4a0d8d195d34R322)), it will fail, as there's, of course, no `domain_name` property on that.","created_at":"2016-05-03T23:05:37Z","updated_at":"2016-05-03T23:05:37Z","html_url":"https://github.com/Automattic/wp-calypso/pull/5100#discussion_r61971312","pull_request_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/5100","_links":{"self":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/comments/61971312"},"html":{"href":"https://github.com/Automattic/wp-calypso/pull/5100#discussion_r61971312"},"pull_request":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/5100"}}},"pull_request":{"url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/5100","id":68303316,"html_url":"https://github.com/Automattic/wp-calypso/pull/5100","diff_url":"https://github.com/Automattic/wp-calypso/pull/5100.diff","patch_url":"https://github.com/Automattic/wp-calypso/pull/5100.patch","issue_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/5100","number":5100,"state":"open","locked":false,"title":"Add/more search stats","user":{"login":"umurkontaci","id":991022,"avatar_url":"https://avatars.githubusercontent.com/u/991022?v=3","gravatar_id":"","url":"https://api.github.com/users/umurkontaci","html_url":"https://github.com/umurkontaci","followers_url":"https://api.github.com/users/umurkontaci/followers","following_url":"https://api.github.com/users/umurkontaci/following{/other_user}","gists_url":"https://api.github.com/users/umurkontaci/gists{/gist_id}","starred_url":"https://api.github.com/users/umurkontaci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/umurkontaci/subscriptions","organizations_url":"https://api.github.com/users/umurkontaci/orgs","repos_url":"https://api.github.com/users/umurkontaci/repos","events_url":"https://api.github.com/users/umurkontaci/events{/privacy}","received_events_url":"https://api.github.com/users/umurkontaci/received_events","type":"User","site_admin":false},"body":"Adds more stats (search pageview, search results receive, availability check receive) to domain search.\r\n\r\nTesting:\r\n- Open network tab \r\n- Go to domain search\r\n- Look for `t.gif` call that includes: `calypso_domain_search_pageview`\r\n- Search for something.com (ensure endswith .com)\r\n- Wait for a result\r\n- Look for `t.gif` calls that include: `calypso_domain_search_results_availability_receive` and `_en=calypso_domain_search_results_suggestions_receive`\r\n\r\n/cc: @klimeryk ","created_at":"2016-04-28T22:53:42Z","updated_at":"2016-05-03T23:05:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f8200a5ac8176e9588ef837fc7d7221b6fe51717","assignee":{"login":"umurkontaci","id":991022,"avatar_url":"https://avatars.githubusercontent.com/u/991022?v=3","gravatar_id":"","url":"https://api.github.com/users/umurkontaci","html_url":"https://github.com/umurkontaci","followers_url":"https://api.github.com/users/umurkontaci/followers","following_url":"https://api.github.com/users/umurkontaci/following{/other_user}","gists_url":"https://api.github.com/users/umurkontaci/gists{/gist_id}","starred_url":"https://api.github.com/users/umurkontaci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/umurkontaci/subscriptions","organizations_url":"https://api.github.com/users/umurkontaci/orgs","repos_url":"https://api.github.com/users/umurkontaci/repos","events_url":"https://api.github.com/users/umurkontaci/events{/privacy}","received_events_url":"https://api.github.com/users/umurkontaci/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/5100/commits","review_comments_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/5100/comments","review_comment_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/5100/comments","statuses_url":"https://api.github.com/repos/Automattic/wp-calypso/statuses/a444df50bbbd451cd78239cfecbd973d8f0ad2e1","head":{"label":"Automattic:add/more-search-stats","ref":"add/more-search-stats","sha":"a444df50bbbd451cd78239cfecbd973d8f0ad2e1","user":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"repo":{"id":45936895,"name":"wp-calypso","full_name":"Automattic/wp-calypso","owner":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Automattic/wp-calypso","description":"The new JavaScript- and API-powered WordPress.com","fork":false,"url":"https://api.github.com/repos/Automattic/wp-calypso","forks_url":"https://api.github.com/repos/Automattic/wp-calypso/forks","keys_url":"https://api.github.com/repos/Automattic/wp-calypso/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Automattic/wp-calypso/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Automattic/wp-calypso/teams","hooks_url":"https://api.github.com/repos/Automattic/wp-calypso/hooks","issue_events_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/events{/number}","events_url":"https://api.github.com/repos/Automattic/wp-calypso/events","assignees_url":"https://api.github.com/repos/Automattic/wp-calypso/assignees{/user}","branches_url":"https://api.github.com/repos/Automattic/wp-calypso/branches{/branch}","tags_url":"https://api.github.com/repos/Automattic/wp-calypso/tags","blobs_url":"https://api.github.com/repos/Automattic/wp-calypso/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Automattic/wp-calypso/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Automattic/wp-calypso/git/refs{/sha}","trees_url":"https://api.github.com/repos/Automattic/wp-calypso/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Automattic/wp-calypso/statuses/{sha}","languages_url":"https://api.github.com/repos/Automattic/wp-calypso/languages","stargazers_url":"https://api.github.com/repos/Automattic/wp-calypso/stargazers","contributors_url":"https://api.github.com/repos/Automattic/wp-calypso/contributors","subscribers_url":"https://api.github.com/repos/Automattic/wp-calypso/subscribers","subscription_url":"https://api.github.com/repos/Automattic/wp-calypso/subscription","commits_url":"https://api.github.com/repos/Automattic/wp-calypso/commits{/sha}","git_commits_url":"https://api.github.com/repos/Automattic/wp-calypso/git/commits{/sha}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/comments{/number}","issue_comment_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/comments{/number}","contents_url":"https://api.github.com/repos/Automattic/wp-calypso/contents/{+path}","compare_url":"https://api.github.com/repos/Automattic/wp-calypso/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Automattic/wp-calypso/merges","archive_url":"https://api.github.com/repos/Automattic/wp-calypso/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Automattic/wp-calypso/downloads","issues_url":"https://api.github.com/repos/Automattic/wp-calypso/issues{/number}","pulls_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls{/number}","milestones_url":"https://api.github.com/repos/Automattic/wp-calypso/milestones{/number}","notifications_url":"https://api.github.com/repos/Automattic/wp-calypso/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/labels{/name}","releases_url":"https://api.github.com/repos/Automattic/wp-calypso/releases{/id}","deployments_url":"https://api.github.com/repos/Automattic/wp-calypso/deployments","created_at":"2015-11-10T20:00:16Z","updated_at":"2016-05-03T18:29:53Z","pushed_at":"2016-05-03T23:04:46Z","git_url":"git://github.com/Automattic/wp-calypso.git","ssh_url":"git@github.com:Automattic/wp-calypso.git","clone_url":"https://github.com/Automattic/wp-calypso.git","svn_url":"https://github.com/Automattic/wp-calypso","homepage":"https://developer.wordpress.com/calypso/","size":75235,"stargazers_count":7249,"watchers_count":7249,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":878,"mirror_url":null,"open_issues_count":1313,"forks":878,"open_issues":1313,"watchers":7249,"default_branch":"master"}},"base":{"label":"Automattic:master","ref":"master","sha":"d6317d96c99a26304cc91ea8db7dc37ef70d0867","user":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"repo":{"id":45936895,"name":"wp-calypso","full_name":"Automattic/wp-calypso","owner":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Automattic/wp-calypso","description":"The new JavaScript- and API-powered WordPress.com","fork":false,"url":"https://api.github.com/repos/Automattic/wp-calypso","forks_url":"https://api.github.com/repos/Automattic/wp-calypso/forks","keys_url":"https://api.github.com/repos/Automattic/wp-calypso/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Automattic/wp-calypso/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Automattic/wp-calypso/teams","hooks_url":"https://api.github.com/repos/Automattic/wp-calypso/hooks","issue_events_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/events{/number}","events_url":"https://api.github.com/repos/Automattic/wp-calypso/events","assignees_url":"https://api.github.com/repos/Automattic/wp-calypso/assignees{/user}","branches_url":"https://api.github.com/repos/Automattic/wp-calypso/branches{/branch}","tags_url":"https://api.github.com/repos/Automattic/wp-calypso/tags","blobs_url":"https://api.github.com/repos/Automattic/wp-calypso/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Automattic/wp-calypso/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Automattic/wp-calypso/git/refs{/sha}","trees_url":"https://api.github.com/repos/Automattic/wp-calypso/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Automattic/wp-calypso/statuses/{sha}","languages_url":"https://api.github.com/repos/Automattic/wp-calypso/languages","stargazers_url":"https://api.github.com/repos/Automattic/wp-calypso/stargazers","contributors_url":"https://api.github.com/repos/Automattic/wp-calypso/contributors","subscribers_url":"https://api.github.com/repos/Automattic/wp-calypso/subscribers","subscription_url":"https://api.github.com/repos/Automattic/wp-calypso/subscription","commits_url":"https://api.github.com/repos/Automattic/wp-calypso/commits{/sha}","git_commits_url":"https://api.github.com/repos/Automattic/wp-calypso/git/commits{/sha}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/comments{/number}","issue_comment_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/comments{/number}","contents_url":"https://api.github.com/repos/Automattic/wp-calypso/contents/{+path}","compare_url":"https://api.github.com/repos/Automattic/wp-calypso/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Automattic/wp-calypso/merges","archive_url":"https://api.github.com/repos/Automattic/wp-calypso/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Automattic/wp-calypso/downloads","issues_url":"https://api.github.com/repos/Automattic/wp-calypso/issues{/number}","pulls_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls{/number}","milestones_url":"https://api.github.com/repos/Automattic/wp-calypso/milestones{/number}","notifications_url":"https://api.github.com/repos/Automattic/wp-calypso/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/labels{/name}","releases_url":"https://api.github.com/repos/Automattic/wp-calypso/releases{/id}","deployments_url":"https://api.github.com/repos/Automattic/wp-calypso/deployments","created_at":"2015-11-10T20:00:16Z","updated_at":"2016-05-03T18:29:53Z","pushed_at":"2016-05-03T23:04:46Z","git_url":"git://github.com/Automattic/wp-calypso.git","ssh_url":"git@github.com:Automattic/wp-calypso.git","clone_url":"https://github.com/Automattic/wp-calypso.git","svn_url":"https://github.com/Automattic/wp-calypso","homepage":"https://developer.wordpress.com/calypso/","size":75235,"stargazers_count":7249,"watchers_count":7249,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":878,"mirror_url":null,"open_issues_count":1313,"forks":878,"open_issues":1313,"watchers":7249,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/5100"},"html":{"href":"https://github.com/Automattic/wp-calypso/pull/5100"},"issue":{"href":"https://api.github.com/repos/Automattic/wp-calypso/issues/5100"},"comments":{"href":"https://api.github.com/repos/Automattic/wp-calypso/issues/5100/comments"},"review_comments":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/5100/comments"},"review_comment":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/5100/commits"},"statuses":{"href":"https://api.github.com/repos/Automattic/wp-calypso/statuses/a444df50bbbd451cd78239cfecbd973d8f0ad2e1"}}}}