{"action":"created","comment":{"url":"https://api.github.com/repos/CartoDB/cartodb/pulls/comments/76982935","id":76982935,"diff_hunk":"@@ -79,6 +80,8 @@ module.exports = CoreView.extend({\n       self._visDefinitionModel.set('visChanges', 0);\n       self._mapcapsCollection.add(data, {at: 0});\n       self.model.set({status: 'updated'});\n+\n+      MetricsTracker.track('Published map', self._visDefinitionModel.attributes);","path":"lib/assets/javascripts/cartodb3/components/modals/publish/publish-button-view.js","position":13,"original_position":13,"commit_id":"f2177d8b96610e3bcd427841746ce6bcd5230626","original_commit_id":"f2177d8b96610e3bcd427841746ce6bcd5230626","user":{"login":"nobuti","id":1366843,"avatar_url":"https://avatars.githubusercontent.com/u/1366843?v=3","gravatar_id":"","url":"https://api.github.com/users/nobuti","html_url":"https://github.com/nobuti","followers_url":"https://api.github.com/users/nobuti/followers","following_url":"https://api.github.com/users/nobuti/following{/other_user}","gists_url":"https://api.github.com/users/nobuti/gists{/gist_id}","starred_url":"https://api.github.com/users/nobuti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nobuti/subscriptions","organizations_url":"https://api.github.com/users/nobuti/orgs","repos_url":"https://api.github.com/users/nobuti/repos","events_url":"https://api.github.com/users/nobuti/events{/privacy}","received_events_url":"https://api.github.com/users/nobuti/received_events","type":"User","site_admin":false},"body":"This is tricky, this button is the same for publish but for update too. We should take account of this, something like this:\r\n```\r\nvar eventName = self._mapcapsCollection.length > 0 ? 'Updated map' : 'Published map';\r\nMetricsTracker.track(eventName, self._visDefinitionModel.attributes);\r\n```","created_at":"2016-08-31T13:04:14Z","updated_at":"2016-08-31T13:04:14Z","html_url":"https://github.com/CartoDB/cartodb/pull/9618#discussion_r76982935","pull_request_url":"https://api.github.com/repos/CartoDB/cartodb/pulls/9618","_links":{"self":{"href":"https://api.github.com/repos/CartoDB/cartodb/pulls/comments/76982935"},"html":{"href":"https://github.com/CartoDB/cartodb/pull/9618#discussion_r76982935"},"pull_request":{"href":"https://api.github.com/repos/CartoDB/cartodb/pulls/9618"}}},"pull_request":{"url":"https://api.github.com/repos/CartoDB/cartodb/pulls/9618","id":83439233,"html_url":"https://github.com/CartoDB/cartodb/pull/9618","diff_url":"https://github.com/CartoDB/cartodb/pull/9618.diff","patch_url":"https://github.com/CartoDB/cartodb/pull/9618.patch","issue_url":"https://api.github.com/repos/CartoDB/cartodb/issues/9618","number":9618,"state":"open","locked":false,"title":"Frontend metrics","user":{"login":"MariaCheca","id":2141690,"avatar_url":"https://avatars.githubusercontent.com/u/2141690?v=3","gravatar_id":"","url":"https://api.github.com/users/MariaCheca","html_url":"https://github.com/MariaCheca","followers_url":"https://api.github.com/users/MariaCheca/followers","following_url":"https://api.github.com/users/MariaCheca/following{/other_user}","gists_url":"https://api.github.com/users/MariaCheca/gists{/gist_id}","starred_url":"https://api.github.com/users/MariaCheca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MariaCheca/subscriptions","organizations_url":"https://api.github.com/users/MariaCheca/orgs","repos_url":"https://api.github.com/users/MariaCheca/repos","events_url":"https://api.github.com/users/MariaCheca/events{/privacy}","received_events_url":"https://api.github.com/users/MariaCheca/received_events","type":"User","site_admin":false},"body":"Closes #9522 \r\n\r\nAdded new module `MetricsTracker` to communicate events occurring in the front to the metrics API. Each event (i.e. create analysis) is preceded by a `MetricsTracker.track()` call to create a new `MetricsModel` object which sends the data we need to the back.\r\n\r\nFront CR @nobuti please :)\r\n\r\n**_Frontend tests passing in dev environment despite those Travis failed builds._**","created_at":"2016-08-31T12:03:02Z","updated_at":"2016-08-31T13:04:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2c7ba86edec1ebc24d60cc7e500efba32ebe4a4d","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/CartoDB/cartodb/pulls/9618/commits","review_comments_url":"https://api.github.com/repos/CartoDB/cartodb/pulls/9618/comments","review_comment_url":"https://api.github.com/repos/CartoDB/cartodb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CartoDB/cartodb/issues/9618/comments","statuses_url":"https://api.github.com/repos/CartoDB/cartodb/statuses/f2177d8b96610e3bcd427841746ce6bcd5230626","head":{"label":"CartoDB:frontend-metrics","ref":"frontend-metrics","sha":"f2177d8b96610e3bcd427841746ce6bcd5230626","user":{"login":"CartoDB","id":1799254,"avatar_url":"https://avatars.githubusercontent.com/u/1799254?v=3","gravatar_id":"","url":"https://api.github.com/users/CartoDB","html_url":"https://github.com/CartoDB","followers_url":"https://api.github.com/users/CartoDB/followers","following_url":"https://api.github.com/users/CartoDB/following{/other_user}","gists_url":"https://api.github.com/users/CartoDB/gists{/gist_id}","starred_url":"https://api.github.com/users/CartoDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CartoDB/subscriptions","organizations_url":"https://api.github.com/users/CartoDB/orgs","repos_url":"https://api.github.com/users/CartoDB/repos","events_url":"https://api.github.com/users/CartoDB/events{/privacy}","received_events_url":"https://api.github.com/users/CartoDB/received_events","type":"Organization","site_admin":false},"repo":{"id":4909355,"name":"cartodb","full_name":"CartoDB/cartodb","owner":{"login":"CartoDB","id":1799254,"avatar_url":"https://avatars.githubusercontent.com/u/1799254?v=3","gravatar_id":"","url":"https://api.github.com/users/CartoDB","html_url":"https://github.com/CartoDB","followers_url":"https://api.github.com/users/CartoDB/followers","following_url":"https://api.github.com/users/CartoDB/following{/other_user}","gists_url":"https://api.github.com/users/CartoDB/gists{/gist_id}","starred_url":"https://api.github.com/users/CartoDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CartoDB/subscriptions","organizations_url":"https://api.github.com/users/CartoDB/orgs","repos_url":"https://api.github.com/users/CartoDB/repos","events_url":"https://api.github.com/users/CartoDB/events{/privacy}","received_events_url":"https://api.github.com/users/CartoDB/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CartoDB/cartodb","description":"Location Intelligence & Data Visualization tool","fork":false,"url":"https://api.github.com/repos/CartoDB/cartodb","forks_url":"https://api.github.com/repos/CartoDB/cartodb/forks","keys_url":"https://api.github.com/repos/CartoDB/cartodb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CartoDB/cartodb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CartoDB/cartodb/teams","hooks_url":"https://api.github.com/repos/CartoDB/cartodb/hooks","issue_events_url":"https://api.github.com/repos/CartoDB/cartodb/issues/events{/number}","events_url":"https://api.github.com/repos/CartoDB/cartodb/events","assignees_url":"https://api.github.com/repos/CartoDB/cartodb/assignees{/user}","branches_url":"https://api.github.com/repos/CartoDB/cartodb/branches{/branch}","tags_url":"https://api.github.com/repos/CartoDB/cartodb/tags","blobs_url":"https://api.github.com/repos/CartoDB/cartodb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CartoDB/cartodb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CartoDB/cartodb/git/refs{/sha}","trees_url":"https://api.github.com/repos/CartoDB/cartodb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CartoDB/cartodb/statuses/{sha}","languages_url":"https://api.github.com/repos/CartoDB/cartodb/languages","stargazers_url":"https://api.github.com/repos/CartoDB/cartodb/stargazers","contributors_url":"https://api.github.com/repos/CartoDB/cartodb/contributors","subscribers_url":"https://api.github.com/repos/CartoDB/cartodb/subscribers","subscription_url":"https://api.github.com/repos/CartoDB/cartodb/subscription","commits_url":"https://api.github.com/repos/CartoDB/cartodb/commits{/sha}","git_commits_url":"https://api.github.com/repos/CartoDB/cartodb/git/commits{/sha}","comments_url":"https://api.github.com/repos/CartoDB/cartodb/comments{/number}","issue_comment_url":"https://api.github.com/repos/CartoDB/cartodb/issues/comments{/number}","contents_url":"https://api.github.com/repos/CartoDB/cartodb/contents/{+path}","compare_url":"https://api.github.com/repos/CartoDB/cartodb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CartoDB/cartodb/merges","archive_url":"https://api.github.com/repos/CartoDB/cartodb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CartoDB/cartodb/downloads","issues_url":"https://api.github.com/repos/CartoDB/cartodb/issues{/number}","pulls_url":"https://api.github.com/repos/CartoDB/cartodb/pulls{/number}","milestones_url":"https://api.github.com/repos/CartoDB/cartodb/milestones{/number}","notifications_url":"https://api.github.com/repos/CartoDB/cartodb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CartoDB/cartodb/labels{/name}","releases_url":"https://api.github.com/repos/CartoDB/cartodb/releases{/id}","deployments_url":"https://api.github.com/repos/CartoDB/cartodb/deployments","created_at":"2012-07-05T15:23:45Z","updated_at":"2016-08-31T11:02:54Z","pushed_at":"2016-08-31T12:03:02Z","git_url":"git://github.com/CartoDB/cartodb.git","ssh_url":"git@github.com:CartoDB/cartodb.git","clone_url":"https://github.com/CartoDB/cartodb.git","svn_url":"https://github.com/CartoDB/cartodb","homepage":"http://carto.com","size":399407,"stargazers_count":1250,"watchers_count":1250,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":320,"mirror_url":null,"open_issues_count":1059,"forks":320,"open_issues":1059,"watchers":1250,"default_branch":"master"}},"base":{"label":"CartoDB:master","ref":"master","sha":"f8c33235c974a49bc70b8cc0a393d79edcf25379","user":{"login":"CartoDB","id":1799254,"avatar_url":"https://avatars.githubusercontent.com/u/1799254?v=3","gravatar_id":"","url":"https://api.github.com/users/CartoDB","html_url":"https://github.com/CartoDB","followers_url":"https://api.github.com/users/CartoDB/followers","following_url":"https://api.github.com/users/CartoDB/following{/other_user}","gists_url":"https://api.github.com/users/CartoDB/gists{/gist_id}","starred_url":"https://api.github.com/users/CartoDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CartoDB/subscriptions","organizations_url":"https://api.github.com/users/CartoDB/orgs","repos_url":"https://api.github.com/users/CartoDB/repos","events_url":"https://api.github.com/users/CartoDB/events{/privacy}","received_events_url":"https://api.github.com/users/CartoDB/received_events","type":"Organization","site_admin":false},"repo":{"id":4909355,"name":"cartodb","full_name":"CartoDB/cartodb","owner":{"login":"CartoDB","id":1799254,"avatar_url":"https://avatars.githubusercontent.com/u/1799254?v=3","gravatar_id":"","url":"https://api.github.com/users/CartoDB","html_url":"https://github.com/CartoDB","followers_url":"https://api.github.com/users/CartoDB/followers","following_url":"https://api.github.com/users/CartoDB/following{/other_user}","gists_url":"https://api.github.com/users/CartoDB/gists{/gist_id}","starred_url":"https://api.github.com/users/CartoDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CartoDB/subscriptions","organizations_url":"https://api.github.com/users/CartoDB/orgs","repos_url":"https://api.github.com/users/CartoDB/repos","events_url":"https://api.github.com/users/CartoDB/events{/privacy}","received_events_url":"https://api.github.com/users/CartoDB/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CartoDB/cartodb","description":"Location Intelligence & Data Visualization tool","fork":false,"url":"https://api.github.com/repos/CartoDB/cartodb","forks_url":"https://api.github.com/repos/CartoDB/cartodb/forks","keys_url":"https://api.github.com/repos/CartoDB/cartodb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CartoDB/cartodb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CartoDB/cartodb/teams","hooks_url":"https://api.github.com/repos/CartoDB/cartodb/hooks","issue_events_url":"https://api.github.com/repos/CartoDB/cartodb/issues/events{/number}","events_url":"https://api.github.com/repos/CartoDB/cartodb/events","assignees_url":"https://api.github.com/repos/CartoDB/cartodb/assignees{/user}","branches_url":"https://api.github.com/repos/CartoDB/cartodb/branches{/branch}","tags_url":"https://api.github.com/repos/CartoDB/cartodb/tags","blobs_url":"https://api.github.com/repos/CartoDB/cartodb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CartoDB/cartodb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CartoDB/cartodb/git/refs{/sha}","trees_url":"https://api.github.com/repos/CartoDB/cartodb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CartoDB/cartodb/statuses/{sha}","languages_url":"https://api.github.com/repos/CartoDB/cartodb/languages","stargazers_url":"https://api.github.com/repos/CartoDB/cartodb/stargazers","contributors_url":"https://api.github.com/repos/CartoDB/cartodb/contributors","subscribers_url":"https://api.github.com/repos/CartoDB/cartodb/subscribers","subscription_url":"https://api.github.com/repos/CartoDB/cartodb/subscription","commits_url":"https://api.github.com/repos/CartoDB/cartodb/commits{/sha}","git_commits_url":"https://api.github.com/repos/CartoDB/cartodb/git/commits{/sha}","comments_url":"https://api.github.com/repos/CartoDB/cartodb/comments{/number}","issue_comment_url":"https://api.github.com/repos/CartoDB/cartodb/issues/comments{/number}","contents_url":"https://api.github.com/repos/CartoDB/cartodb/contents/{+path}","compare_url":"https://api.github.com/repos/CartoDB/cartodb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CartoDB/cartodb/merges","archive_url":"https://api.github.com/repos/CartoDB/cartodb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CartoDB/cartodb/downloads","issues_url":"https://api.github.com/repos/CartoDB/cartodb/issues{/number}","pulls_url":"https://api.github.com/repos/CartoDB/cartodb/pulls{/number}","milestones_url":"https://api.github.com/repos/CartoDB/cartodb/milestones{/number}","notifications_url":"https://api.github.com/repos/CartoDB/cartodb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CartoDB/cartodb/labels{/name}","releases_url":"https://api.github.com/repos/CartoDB/cartodb/releases{/id}","deployments_url":"https://api.github.com/repos/CartoDB/cartodb/deployments","created_at":"2012-07-05T15:23:45Z","updated_at":"2016-08-31T11:02:54Z","pushed_at":"2016-08-31T12:03:02Z","git_url":"git://github.com/CartoDB/cartodb.git","ssh_url":"git@github.com:CartoDB/cartodb.git","clone_url":"https://github.com/CartoDB/cartodb.git","svn_url":"https://github.com/CartoDB/cartodb","homepage":"http://carto.com","size":399407,"stargazers_count":1250,"watchers_count":1250,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":320,"mirror_url":null,"open_issues_count":1059,"forks":320,"open_issues":1059,"watchers":1250,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CartoDB/cartodb/pulls/9618"},"html":{"href":"https://github.com/CartoDB/cartodb/pull/9618"},"issue":{"href":"https://api.github.com/repos/CartoDB/cartodb/issues/9618"},"comments":{"href":"https://api.github.com/repos/CartoDB/cartodb/issues/9618/comments"},"review_comments":{"href":"https://api.github.com/repos/CartoDB/cartodb/pulls/9618/comments"},"review_comment":{"href":"https://api.github.com/repos/CartoDB/cartodb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CartoDB/cartodb/pulls/9618/commits"},"statuses":{"href":"https://api.github.com/repos/CartoDB/cartodb/statuses/f2177d8b96610e3bcd427841746ce6bcd5230626"}}}}
{"actor":{"display_login":"nobuti"}}