{"action":"created","comment":{"url":"https://api.github.com/repos/Animatron/player/pulls/comments/41451473","id":41451473,"diff_hunk":"@@ -33,40 +43,41 @@ var Analytics = function () {\n     this.trackPlayingComplete = this.trackPlayer('playing_complete');\n };\n \n-Analytics.prototype.track = function track(name, opts) {\n-    opts = opts || {};\n-    opts.name = name;\n-    opts.referer = document.referrer;\n-    opts.lang = navigator.language || navigator.userLanguage;\n-    opts.url = location.href;\n-    opts.screenHeight = screen.height;\n-    opts.screenWidth = screen.width;\n-    opts.windowHeight = window.innerHeight;\n-    opts.windowWidth = window.innerWidth;\n-    opts.timestamp = new Date().getTime();\n+Analytics.prototype.track = function track(name, player, action) {\n     if (this.enabled) {\n-        this.queue.push(opts);\n+        this.queue[player.viewId] = this.queue[player.viewId] || {\n+                viewId: player.viewId,\n+                projectId: player.anim.meta._anm_id,","path":"src/anm/analytics.js","position":61,"original_position":61,"commit_id":"634bbab41ab9223436142b8bdef6ae0de60c6ddc","original_commit_id":"634bbab41ab9223436142b8bdef6ae0de60c6ddc","user":{"login":"RobertoUa","id":1307169,"avatar_url":"https://avatars.githubusercontent.com/u/1307169?v=3","gravatar_id":"","url":"https://api.github.com/users/RobertoUa","html_url":"https://github.com/RobertoUa","followers_url":"https://api.github.com/users/RobertoUa/followers","following_url":"https://api.github.com/users/RobertoUa/following{/other_user}","gists_url":"https://api.github.com/users/RobertoUa/gists{/gist_id}","starred_url":"https://api.github.com/users/RobertoUa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RobertoUa/subscriptions","organizations_url":"https://api.github.com/users/RobertoUa/orgs","repos_url":"https://api.github.com/users/RobertoUa/repos","events_url":"https://api.github.com/users/RobertoUa/events{/privacy}","received_events_url":"https://api.github.com/users/RobertoUa/received_events","type":"User","site_admin":false},"body":"id of a view :)\r\nI need some id so that i can group actions(play, pause, etc)","created_at":"2015-10-07T21:41:22Z","updated_at":"2015-10-07T21:41:22Z","html_url":"https://github.com/Animatron/player/pull/336#discussion_r41451473","pull_request_url":"https://api.github.com/repos/Animatron/player/pulls/336","_links":{"self":{"href":"https://api.github.com/repos/Animatron/player/pulls/comments/41451473"},"html":{"href":"https://github.com/Animatron/player/pull/336#discussion_r41451473"},"pull_request":{"href":"https://api.github.com/repos/Animatron/player/pulls/336"}}},"pull_request":{"url":"https://api.github.com/repos/Animatron/player/pulls/336","id":46873672,"html_url":"https://github.com/Animatron/player/pull/336","diff_url":"https://github.com/Animatron/player/pull/336.diff","patch_url":"https://github.com/Animatron/player/pull/336.patch","issue_url":"https://api.github.com/repos/Animatron/player/issues/336","number":336,"state":"open","locked":false,"title":"Barna/analytics new format","user":{"login":"RobertoUa","id":1307169,"avatar_url":"https://avatars.githubusercontent.com/u/1307169?v=3","gravatar_id":"","url":"https://api.github.com/users/RobertoUa","html_url":"https://github.com/RobertoUa","followers_url":"https://api.github.com/users/RobertoUa/followers","following_url":"https://api.github.com/users/RobertoUa/following{/other_user}","gists_url":"https://api.github.com/users/RobertoUa/gists{/gist_id}","starred_url":"https://api.github.com/users/RobertoUa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RobertoUa/subscriptions","organizations_url":"https://api.github.com/users/RobertoUa/orgs","repos_url":"https://api.github.com/users/RobertoUa/repos","events_url":"https://api.github.com/users/RobertoUa/events{/privacy}","received_events_url":"https://api.github.com/users/RobertoUa/received_events","type":"User","site_admin":false},"body":"added `trackPlayingComplete` on detach and also on page close/navigate.\r\nnew format, easier to aggregate on backend, and much faster\r\nsupport http://analytics.animatron-test.com/\r\n\r\nDO NOT MERGE until http://analytics.animatron-test.com/ is up and ready","created_at":"2015-10-06T08:19:05Z","updated_at":"2015-10-07T21:41:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1616c795aa0d3fe458e3d7cb4cbd8b74f80825aa","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Animatron/player/pulls/336/commits","review_comments_url":"https://api.github.com/repos/Animatron/player/pulls/336/comments","review_comment_url":"https://api.github.com/repos/Animatron/player/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Animatron/player/issues/336/comments","statuses_url":"https://api.github.com/repos/Animatron/player/statuses/634bbab41ab9223436142b8bdef6ae0de60c6ddc","head":{"label":"RobertoUa:barna/analytics_new_format","ref":"barna/analytics_new_format","sha":"634bbab41ab9223436142b8bdef6ae0de60c6ddc","user":{"login":"RobertoUa","id":1307169,"avatar_url":"https://avatars.githubusercontent.com/u/1307169?v=3","gravatar_id":"","url":"https://api.github.com/users/RobertoUa","html_url":"https://github.com/RobertoUa","followers_url":"https://api.github.com/users/RobertoUa/followers","following_url":"https://api.github.com/users/RobertoUa/following{/other_user}","gists_url":"https://api.github.com/users/RobertoUa/gists{/gist_id}","starred_url":"https://api.github.com/users/RobertoUa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RobertoUa/subscriptions","organizations_url":"https://api.github.com/users/RobertoUa/orgs","repos_url":"https://api.github.com/users/RobertoUa/repos","events_url":"https://api.github.com/users/RobertoUa/events{/privacy}","received_events_url":"https://api.github.com/users/RobertoUa/received_events","type":"User","site_admin":false},"repo":{"id":18397037,"name":"player","full_name":"RobertoUa/player","owner":{"login":"RobertoUa","id":1307169,"avatar_url":"https://avatars.githubusercontent.com/u/1307169?v=3","gravatar_id":"","url":"https://api.github.com/users/RobertoUa","html_url":"https://github.com/RobertoUa","followers_url":"https://api.github.com/users/RobertoUa/followers","following_url":"https://api.github.com/users/RobertoUa/following{/other_user}","gists_url":"https://api.github.com/users/RobertoUa/gists{/gist_id}","starred_url":"https://api.github.com/users/RobertoUa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RobertoUa/subscriptions","organizations_url":"https://api.github.com/users/RobertoUa/orgs","repos_url":"https://api.github.com/users/RobertoUa/repos","events_url":"https://api.github.com/users/RobertoUa/events{/privacy}","received_events_url":"https://api.github.com/users/RobertoUa/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/RobertoUa/player","description":"JavaScript player for Animatron Tool","fork":true,"url":"https://api.github.com/repos/RobertoUa/player","forks_url":"https://api.github.com/repos/RobertoUa/player/forks","keys_url":"https://api.github.com/repos/RobertoUa/player/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RobertoUa/player/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RobertoUa/player/teams","hooks_url":"https://api.github.com/repos/RobertoUa/player/hooks","issue_events_url":"https://api.github.com/repos/RobertoUa/player/issues/events{/number}","events_url":"https://api.github.com/repos/RobertoUa/player/events","assignees_url":"https://api.github.com/repos/RobertoUa/player/assignees{/user}","branches_url":"https://api.github.com/repos/RobertoUa/player/branches{/branch}","tags_url":"https://api.github.com/repos/RobertoUa/player/tags","blobs_url":"https://api.github.com/repos/RobertoUa/player/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RobertoUa/player/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RobertoUa/player/git/refs{/sha}","trees_url":"https://api.github.com/repos/RobertoUa/player/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RobertoUa/player/statuses/{sha}","languages_url":"https://api.github.com/repos/RobertoUa/player/languages","stargazers_url":"https://api.github.com/repos/RobertoUa/player/stargazers","contributors_url":"https://api.github.com/repos/RobertoUa/player/contributors","subscribers_url":"https://api.github.com/repos/RobertoUa/player/subscribers","subscription_url":"https://api.github.com/repos/RobertoUa/player/subscription","commits_url":"https://api.github.com/repos/RobertoUa/player/commits{/sha}","git_commits_url":"https://api.github.com/repos/RobertoUa/player/git/commits{/sha}","comments_url":"https://api.github.com/repos/RobertoUa/player/comments{/number}","issue_comment_url":"https://api.github.com/repos/RobertoUa/player/issues/comments{/number}","contents_url":"https://api.github.com/repos/RobertoUa/player/contents/{+path}","compare_url":"https://api.github.com/repos/RobertoUa/player/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RobertoUa/player/merges","archive_url":"https://api.github.com/repos/RobertoUa/player/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RobertoUa/player/downloads","issues_url":"https://api.github.com/repos/RobertoUa/player/issues{/number}","pulls_url":"https://api.github.com/repos/RobertoUa/player/pulls{/number}","milestones_url":"https://api.github.com/repos/RobertoUa/player/milestones{/number}","notifications_url":"https://api.github.com/repos/RobertoUa/player/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RobertoUa/player/labels{/name}","releases_url":"https://api.github.com/repos/RobertoUa/player/releases{/id}","created_at":"2014-04-03T09:00:30Z","updated_at":"2014-06-04T11:05:31Z","pushed_at":"2015-10-05T12:35:27Z","git_url":"git://github.com/RobertoUa/player.git","ssh_url":"git@github.com:RobertoUa/player.git","clone_url":"https://github.com/RobertoUa/player.git","svn_url":"https://github.com/RobertoUa/player","homepage":"http://animatron.com/player","size":29912,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Animatron:develop","ref":"develop","sha":"f302b451b3bc4e1d334976acb33b9e802b423ac9","user":{"login":"Animatron","id":1387673,"avatar_url":"https://avatars.githubusercontent.com/u/1387673?v=3","gravatar_id":"","url":"https://api.github.com/users/Animatron","html_url":"https://github.com/Animatron","followers_url":"https://api.github.com/users/Animatron/followers","following_url":"https://api.github.com/users/Animatron/following{/other_user}","gists_url":"https://api.github.com/users/Animatron/gists{/gist_id}","starred_url":"https://api.github.com/users/Animatron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Animatron/subscriptions","organizations_url":"https://api.github.com/users/Animatron/orgs","repos_url":"https://api.github.com/users/Animatron/repos","events_url":"https://api.github.com/users/Animatron/events{/privacy}","received_events_url":"https://api.github.com/users/Animatron/received_events","type":"Organization","site_admin":false},"repo":{"id":3326050,"name":"player","full_name":"Animatron/player","owner":{"login":"Animatron","id":1387673,"avatar_url":"https://avatars.githubusercontent.com/u/1387673?v=3","gravatar_id":"","url":"https://api.github.com/users/Animatron","html_url":"https://github.com/Animatron","followers_url":"https://api.github.com/users/Animatron/followers","following_url":"https://api.github.com/users/Animatron/following{/other_user}","gists_url":"https://api.github.com/users/Animatron/gists{/gist_id}","starred_url":"https://api.github.com/users/Animatron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Animatron/subscriptions","organizations_url":"https://api.github.com/users/Animatron/orgs","repos_url":"https://api.github.com/users/Animatron/repos","events_url":"https://api.github.com/users/Animatron/events{/privacy}","received_events_url":"https://api.github.com/users/Animatron/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Animatron/player","description":"JavaScript player for Animatron Tool","fork":false,"url":"https://api.github.com/repos/Animatron/player","forks_url":"https://api.github.com/repos/Animatron/player/forks","keys_url":"https://api.github.com/repos/Animatron/player/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Animatron/player/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Animatron/player/teams","hooks_url":"https://api.github.com/repos/Animatron/player/hooks","issue_events_url":"https://api.github.com/repos/Animatron/player/issues/events{/number}","events_url":"https://api.github.com/repos/Animatron/player/events","assignees_url":"https://api.github.com/repos/Animatron/player/assignees{/user}","branches_url":"https://api.github.com/repos/Animatron/player/branches{/branch}","tags_url":"https://api.github.com/repos/Animatron/player/tags","blobs_url":"https://api.github.com/repos/Animatron/player/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Animatron/player/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Animatron/player/git/refs{/sha}","trees_url":"https://api.github.com/repos/Animatron/player/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Animatron/player/statuses/{sha}","languages_url":"https://api.github.com/repos/Animatron/player/languages","stargazers_url":"https://api.github.com/repos/Animatron/player/stargazers","contributors_url":"https://api.github.com/repos/Animatron/player/contributors","subscribers_url":"https://api.github.com/repos/Animatron/player/subscribers","subscription_url":"https://api.github.com/repos/Animatron/player/subscription","commits_url":"https://api.github.com/repos/Animatron/player/commits{/sha}","git_commits_url":"https://api.github.com/repos/Animatron/player/git/commits{/sha}","comments_url":"https://api.github.com/repos/Animatron/player/comments{/number}","issue_comment_url":"https://api.github.com/repos/Animatron/player/issues/comments{/number}","contents_url":"https://api.github.com/repos/Animatron/player/contents/{+path}","compare_url":"https://api.github.com/repos/Animatron/player/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Animatron/player/merges","archive_url":"https://api.github.com/repos/Animatron/player/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Animatron/player/downloads","issues_url":"https://api.github.com/repos/Animatron/player/issues{/number}","pulls_url":"https://api.github.com/repos/Animatron/player/pulls{/number}","milestones_url":"https://api.github.com/repos/Animatron/player/milestones{/number}","notifications_url":"https://api.github.com/repos/Animatron/player/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Animatron/player/labels{/name}","releases_url":"https://api.github.com/repos/Animatron/player/releases{/id}","created_at":"2012-02-01T15:33:51Z","updated_at":"2015-08-23T05:30:21Z","pushed_at":"2015-10-07T17:44:32Z","git_url":"git://github.com/Animatron/player.git","ssh_url":"git@github.com:Animatron/player.git","clone_url":"https://github.com/Animatron/player.git","svn_url":"https://github.com/Animatron/player","homepage":"http://animatron.github.io/player","size":36001,"stargazers_count":43,"watchers_count":43,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":11,"mirror_url":null,"open_issues_count":1,"forks":11,"open_issues":1,"watchers":43,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/Animatron/player/pulls/336"},"html":{"href":"https://github.com/Animatron/player/pull/336"},"issue":{"href":"https://api.github.com/repos/Animatron/player/issues/336"},"comments":{"href":"https://api.github.com/repos/Animatron/player/issues/336/comments"},"review_comments":{"href":"https://api.github.com/repos/Animatron/player/pulls/336/comments"},"review_comment":{"href":"https://api.github.com/repos/Animatron/player/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Animatron/player/pulls/336/commits"},"statuses":{"href":"https://api.github.com/repos/Animatron/player/statuses/634bbab41ab9223436142b8bdef6ae0de60c6ddc"}}}}