{"action":"created","comment":{"url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments/56416375","id":56416375,"diff_hunk":"@@ -364,10 +375,14 @@ var tbOptions = {\n                     }\n                     tb.filter(event);\n                 },\n-                onchange: m.withAttr('value', tb.filterText),\n+                onchange: function() {\n+                    m.withAttr('value', tb.filterText);","path":"website/static/js/project-organizer.js","position":57,"original_position":57,"commit_id":"0f49f8f9d9d38ce5998b77b9014cd20bd22bfa19","original_commit_id":"df6dfb30d43c8164760d998799fa53bec042b62c","user":{"login":"sloria","id":2379650,"avatar_url":"https://avatars.githubusercontent.com/u/2379650?v=3","gravatar_id":"","url":"https://api.github.com/users/sloria","html_url":"https://github.com/sloria","followers_url":"https://api.github.com/users/sloria/followers","following_url":"https://api.github.com/users/sloria/following{/other_user}","gists_url":"https://api.github.com/users/sloria/gists{/gist_id}","starred_url":"https://api.github.com/users/sloria/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sloria/subscriptions","organizations_url":"https://api.github.com/users/sloria/orgs","repos_url":"https://api.github.com/users/sloria/repos","events_url":"https://api.github.com/users/sloria/events{/privacy}","received_events_url":"https://api.github.com/users/sloria/received_events","type":"User","site_admin":false},"body":"Yep, I had a poor understanding of when `onchange` was fire. You're right; the `trackClick` belongs here. So I think the only change to make is to replace the `withAttr` with `tb.filterText(event.value)` .","created_at":"2016-03-16T21:14:53Z","updated_at":"2016-03-16T21:14:53Z","html_url":"https://github.com/CenterForOpenScience/osf.io/pull/5177#discussion_r56416375","pull_request_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/5177","_links":{"self":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments/56416375"},"html":{"href":"https://github.com/CenterForOpenScience/osf.io/pull/5177#discussion_r56416375"},"pull_request":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/5177"}}},"pull_request":{"url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/5177","id":62569259,"html_url":"https://github.com/CenterForOpenScience/osf.io/pull/5177","diff_url":"https://github.com/CenterForOpenScience/osf.io/pull/5177.diff","patch_url":"https://github.com/CenterForOpenScience/osf.io/pull/5177.patch","issue_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/5177","number":5177,"state":"open","locked":false,"title":"[Ready to Review] Feature/dashboard event tracking","user":{"login":"pattisdr","id":9755598,"avatar_url":"https://avatars.githubusercontent.com/u/9755598?v=3","gravatar_id":"","url":"https://api.github.com/users/pattisdr","html_url":"https://github.com/pattisdr","followers_url":"https://api.github.com/users/pattisdr/followers","following_url":"https://api.github.com/users/pattisdr/following{/other_user}","gists_url":"https://api.github.com/users/pattisdr/gists{/gist_id}","starred_url":"https://api.github.com/users/pattisdr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pattisdr/subscriptions","organizations_url":"https://api.github.com/users/pattisdr/orgs","repos_url":"https://api.github.com/users/pattisdr/repos","events_url":"https://api.github.com/users/pattisdr/events{/privacy}","received_events_url":"https://api.github.com/users/pattisdr/received_events","type":"User","site_admin":false},"body":"# Purpose\r\n\r\nIssue https://openscience.atlassian.net/browse/OSF-5721\r\nAdds high level Google Analytics event tracking to new dashboard to gauge what features are being used.\r\n\r\n# Changes\r\n\r\n<b>Tracks a combined 96 events in project organizer/dashboard and home page.</b>  All high level tracking, basically clicks, if users filtered, etc.  No information being tracked about specific users.\r\n\r\nEvent tracking format looks like this: \r\nga('send', 'event', [eventCategory], [eventAction], [eventLabel], [eventValue], [fieldsObject]);\r\n\r\nUsing eventCategory, eventAction, eventLabel.  Can explore sending in eventValue with appropriate fields (must be an integer).\r\n\r\nSample event: \r\n   `$osf.trackClick('recentActivity', 'filter', 'filter-on-files');`\r\n\r\nThis indicates that someone within the recent activity widget clicked on the word \"files\" to filter log actions by files.\r\n\r\n# For the reviewer\r\nClicking on some links trigger the same actions and I've chosen to group them together.  For example, there are two places where you can click to add a component on the dashboard. I've grouped them together. Going through the events and determining if there is a better way to group them would be important.\r\n\r\nAlso, the vast majority of the events that can be tracked are here - but are there any missing that you think we need?","created_at":"2016-03-11T16:43:02Z","updated_at":"2016-03-16T21:14:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dfd869e7f9d4012f0b77fb3c32d431b09eca6339","assignee":null,"milestone":{"url":"https://api.github.com/repos/CenterForOpenScience/osf.io/milestones/65","html_url":"https://github.com/CenterForOpenScience/osf.io/milestones/0.66.0","labels_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/milestones/65/labels","id":1613152,"number":65,"title":"0.66.0","description":"","creator":{"login":"sloria","id":2379650,"avatar_url":"https://avatars.githubusercontent.com/u/2379650?v=3","gravatar_id":"","url":"https://api.github.com/users/sloria","html_url":"https://github.com/sloria","followers_url":"https://api.github.com/users/sloria/followers","following_url":"https://api.github.com/users/sloria/following{/other_user}","gists_url":"https://api.github.com/users/sloria/gists{/gist_id}","starred_url":"https://api.github.com/users/sloria/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sloria/subscriptions","organizations_url":"https://api.github.com/users/sloria/orgs","repos_url":"https://api.github.com/users/sloria/repos","events_url":"https://api.github.com/users/sloria/events{/privacy}","received_events_url":"https://api.github.com/users/sloria/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":51,"state":"open","created_at":"2016-02-29T19:57:46Z","updated_at":"2016-03-16T20:43:49Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/5177/commits","review_comments_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/5177/comments","review_comment_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/5177/comments","statuses_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/statuses/0f49f8f9d9d38ce5998b77b9014cd20bd22bfa19","head":{"label":"pattisdr:feature/dashboard_event_tracking","ref":"feature/dashboard_event_tracking","sha":"0f49f8f9d9d38ce5998b77b9014cd20bd22bfa19","user":{"login":"pattisdr","id":9755598,"avatar_url":"https://avatars.githubusercontent.com/u/9755598?v=3","gravatar_id":"","url":"https://api.github.com/users/pattisdr","html_url":"https://github.com/pattisdr","followers_url":"https://api.github.com/users/pattisdr/followers","following_url":"https://api.github.com/users/pattisdr/following{/other_user}","gists_url":"https://api.github.com/users/pattisdr/gists{/gist_id}","starred_url":"https://api.github.com/users/pattisdr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pattisdr/subscriptions","organizations_url":"https://api.github.com/users/pattisdr/orgs","repos_url":"https://api.github.com/users/pattisdr/repos","events_url":"https://api.github.com/users/pattisdr/events{/privacy}","received_events_url":"https://api.github.com/users/pattisdr/received_events","type":"User","site_admin":false},"repo":{"id":35900874,"name":"osf.io","full_name":"pattisdr/osf.io","owner":{"login":"pattisdr","id":9755598,"avatar_url":"https://avatars.githubusercontent.com/u/9755598?v=3","gravatar_id":"","url":"https://api.github.com/users/pattisdr","html_url":"https://github.com/pattisdr","followers_url":"https://api.github.com/users/pattisdr/followers","following_url":"https://api.github.com/users/pattisdr/following{/other_user}","gists_url":"https://api.github.com/users/pattisdr/gists{/gist_id}","starred_url":"https://api.github.com/users/pattisdr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pattisdr/subscriptions","organizations_url":"https://api.github.com/users/pattisdr/orgs","repos_url":"https://api.github.com/users/pattisdr/repos","events_url":"https://api.github.com/users/pattisdr/events{/privacy}","received_events_url":"https://api.github.com/users/pattisdr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pattisdr/osf.io","description":"Facilitating Open Science","fork":true,"url":"https://api.github.com/repos/pattisdr/osf.io","forks_url":"https://api.github.com/repos/pattisdr/osf.io/forks","keys_url":"https://api.github.com/repos/pattisdr/osf.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pattisdr/osf.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pattisdr/osf.io/teams","hooks_url":"https://api.github.com/repos/pattisdr/osf.io/hooks","issue_events_url":"https://api.github.com/repos/pattisdr/osf.io/issues/events{/number}","events_url":"https://api.github.com/repos/pattisdr/osf.io/events","assignees_url":"https://api.github.com/repos/pattisdr/osf.io/assignees{/user}","branches_url":"https://api.github.com/repos/pattisdr/osf.io/branches{/branch}","tags_url":"https://api.github.com/repos/pattisdr/osf.io/tags","blobs_url":"https://api.github.com/repos/pattisdr/osf.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pattisdr/osf.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pattisdr/osf.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/pattisdr/osf.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pattisdr/osf.io/statuses/{sha}","languages_url":"https://api.github.com/repos/pattisdr/osf.io/languages","stargazers_url":"https://api.github.com/repos/pattisdr/osf.io/stargazers","contributors_url":"https://api.github.com/repos/pattisdr/osf.io/contributors","subscribers_url":"https://api.github.com/repos/pattisdr/osf.io/subscribers","subscription_url":"https://api.github.com/repos/pattisdr/osf.io/subscription","commits_url":"https://api.github.com/repos/pattisdr/osf.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/pattisdr/osf.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/pattisdr/osf.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/pattisdr/osf.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/pattisdr/osf.io/contents/{+path}","compare_url":"https://api.github.com/repos/pattisdr/osf.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pattisdr/osf.io/merges","archive_url":"https://api.github.com/repos/pattisdr/osf.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pattisdr/osf.io/downloads","issues_url":"https://api.github.com/repos/pattisdr/osf.io/issues{/number}","pulls_url":"https://api.github.com/repos/pattisdr/osf.io/pulls{/number}","milestones_url":"https://api.github.com/repos/pattisdr/osf.io/milestones{/number}","notifications_url":"https://api.github.com/repos/pattisdr/osf.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pattisdr/osf.io/labels{/name}","releases_url":"https://api.github.com/repos/pattisdr/osf.io/releases{/id}","deployments_url":"https://api.github.com/repos/pattisdr/osf.io/deployments","created_at":"2015-05-19T18:33:09Z","updated_at":"2016-01-11T21:17:43Z","pushed_at":"2016-03-16T19:03:04Z","git_url":"git://github.com/pattisdr/osf.io.git","ssh_url":"git@github.com:pattisdr/osf.io.git","clone_url":"https://github.com/pattisdr/osf.io.git","svn_url":"https://github.com/pattisdr/osf.io","homepage":"http://osf.io","size":124631,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"CenterForOpenScience:feature/dashboard","ref":"feature/dashboard","sha":"f9f50246ef464fdbb9f6c6185f2c7f63c1d9a195","user":{"login":"CenterForOpenScience","id":3344584,"avatar_url":"https://avatars.githubusercontent.com/u/3344584?v=3","gravatar_id":"","url":"https://api.github.com/users/CenterForOpenScience","html_url":"https://github.com/CenterForOpenScience","followers_url":"https://api.github.com/users/CenterForOpenScience/followers","following_url":"https://api.github.com/users/CenterForOpenScience/following{/other_user}","gists_url":"https://api.github.com/users/CenterForOpenScience/gists{/gist_id}","starred_url":"https://api.github.com/users/CenterForOpenScience/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CenterForOpenScience/subscriptions","organizations_url":"https://api.github.com/users/CenterForOpenScience/orgs","repos_url":"https://api.github.com/users/CenterForOpenScience/repos","events_url":"https://api.github.com/users/CenterForOpenScience/events{/privacy}","received_events_url":"https://api.github.com/users/CenterForOpenScience/received_events","type":"Organization","site_admin":false},"repo":{"id":10199599,"name":"osf.io","full_name":"CenterForOpenScience/osf.io","owner":{"login":"CenterForOpenScience","id":3344584,"avatar_url":"https://avatars.githubusercontent.com/u/3344584?v=3","gravatar_id":"","url":"https://api.github.com/users/CenterForOpenScience","html_url":"https://github.com/CenterForOpenScience","followers_url":"https://api.github.com/users/CenterForOpenScience/followers","following_url":"https://api.github.com/users/CenterForOpenScience/following{/other_user}","gists_url":"https://api.github.com/users/CenterForOpenScience/gists{/gist_id}","starred_url":"https://api.github.com/users/CenterForOpenScience/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CenterForOpenScience/subscriptions","organizations_url":"https://api.github.com/users/CenterForOpenScience/orgs","repos_url":"https://api.github.com/users/CenterForOpenScience/repos","events_url":"https://api.github.com/users/CenterForOpenScience/events{/privacy}","received_events_url":"https://api.github.com/users/CenterForOpenScience/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CenterForOpenScience/osf.io","description":"Facilitating Open Science","fork":false,"url":"https://api.github.com/repos/CenterForOpenScience/osf.io","forks_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/forks","keys_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/teams","hooks_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/hooks","issue_events_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/events{/number}","events_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/events","assignees_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/assignees{/user}","branches_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/branches{/branch}","tags_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/tags","blobs_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/statuses/{sha}","languages_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/languages","stargazers_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/stargazers","contributors_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/contributors","subscribers_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/subscribers","subscription_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/subscription","commits_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/contents/{+path}","compare_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/merges","archive_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/downloads","issues_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues{/number}","pulls_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls{/number}","milestones_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/milestones{/number}","notifications_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/labels{/name}","releases_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/releases{/id}","deployments_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/deployments","created_at":"2013-05-21T15:53:37Z","updated_at":"2016-03-11T14:17:57Z","pushed_at":"2016-03-16T20:57:08Z","git_url":"git://github.com/CenterForOpenScience/osf.io.git","ssh_url":"git@github.com:CenterForOpenScience/osf.io.git","clone_url":"https://github.com/CenterForOpenScience/osf.io.git","svn_url":"https://github.com/CenterForOpenScience/osf.io","homepage":"http://osf.io","size":269368,"stargazers_count":201,"watchers_count":201,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":158,"mirror_url":null,"open_issues_count":200,"forks":158,"open_issues":200,"watchers":201,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/5177"},"html":{"href":"https://github.com/CenterForOpenScience/osf.io/pull/5177"},"issue":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/5177"},"comments":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/5177/comments"},"review_comments":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/5177/comments"},"review_comment":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/5177/commits"},"statuses":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/statuses/0f49f8f9d9d38ce5998b77b9014cd20bd22bfa19"}}}}