{"action":"created","comment":{"url":"https://api.github.com/repos/busyorg/busy/pulls/comments/149483715","pull_request_review_id":74884232,"id":149483715,"diff_hunk":"@@ -23,83 +23,93 @@ import Drafts from './post/Write/Drafts';\n import RequireLogin from './auth/RequireLogin';\n import Wallet from './wallet/Wallet';\n \n+const logPageView = () => {\n+  if (window.analytics) {\n+    window.analytics.page({ url: window.location.pathname });\n+  }\n+  return null;\n+};\n+\n export default (\n   <Wrapper>\n-    <Switch>\n-      <Route exact path=\"/\" component={Page} />\n-      <Route\n-        path=\"/replies\"\n-        render={() => (\n-          <RequireLogin>\n-            <Replies />\n-          </RequireLogin>\n-        )}\n-      />\n-      <Route path=\"/help\" component={Help} />\n-      <Route path=\"/about\" component={About} />\n-      <Route path=\"/team\" component={Team} />\n-      <Route path=\"/tags\" component={Tags} />\n-      <Route path=\"/donors\" component={Donors} />\n-      <Route\n-        path=\"/bookmarks\"\n-        render={() => (\n-          <RequireLogin>\n-            <Bookmarks />\n-          </RequireLogin>\n-        )}\n-      />\n-      <Route\n-        path=\"/write\"\n-        render={() => (\n-          <RequireLogin>\n-            <Write />\n-          </RequireLogin>\n-        )}\n-      />\n-      <Route\n-        path=\"/drafts\"\n-        render={() => (\n-          <RequireLogin>\n-            <Drafts />\n-          </RequireLogin>\n-        )}\n-      />\n-      <Route\n-        path=\"/activity\"\n-        render={() => (\n-          <RequireLogin>\n-            <Activity />\n-          </RequireLogin>\n-        )}\n-      />\n-      <Route\n-        path=\"/settings\"\n-        render={() => (\n-          <RequireLogin>\n-            <Settings />\n-          </RequireLogin>\n-        )}\n-      />\n-      <Route\n-        path=\"/edit-profile\"\n-        render={() => (\n-          <RequireLogin>\n-            <ProfileSettings />\n-          </RequireLogin>\n-        )}\n-      />\n-      <Route\n-        path=\"/wallet\"\n-        render={() => (\n-          <RequireLogin>\n-            <Wallet />\n-          </RequireLogin>\n-        )}\n-      />\n-      <Route path=\"/@:name\" component={User} />\n-      <Route path=\"/:category/@:author/:permlink\" component={Post} />\n-      <Route path=\"/\" component={Page} />\n-    </Switch>\n+    <div>\n+      <Route component={logPageView} />","path":"src/routes.js","position":89,"original_position":89,"commit_id":"b9fa44fbdcf8e6219c91a1fcf02a8042c3c18029","original_commit_id":"b9fa44fbdcf8e6219c91a1fcf02a8042c3c18029","user":{"login":"bonustrack","id":16245250,"avatar_url":"https://avatars3.githubusercontent.com/u/16245250?v=4","gravatar_id":"","url":"https://api.github.com/users/bonustrack","html_url":"https://github.com/bonustrack","followers_url":"https://api.github.com/users/bonustrack/followers","following_url":"https://api.github.com/users/bonustrack/following{/other_user}","gists_url":"https://api.github.com/users/bonustrack/gists{/gist_id}","starred_url":"https://api.github.com/users/bonustrack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bonustrack/subscriptions","organizations_url":"https://api.github.com/users/bonustrack/orgs","repos_url":"https://api.github.com/users/bonustrack/repos","events_url":"https://api.github.com/users/bonustrack/events{/privacy}","received_events_url":"https://api.github.com/users/bonustrack/received_events","type":"User","site_admin":false},"body":"@jm90m Yes it's required to track when user change page to get this data on analytics.","created_at":"2017-11-07T19:47:47Z","updated_at":"2017-11-07T19:47:47Z","html_url":"https://github.com/busyorg/busy/pull/1042#discussion_r149483715","pull_request_url":"https://api.github.com/repos/busyorg/busy/pulls/1042","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/busyorg/busy/pulls/comments/149483715"},"html":{"href":"https://github.com/busyorg/busy/pull/1042#discussion_r149483715"},"pull_request":{"href":"https://api.github.com/repos/busyorg/busy/pulls/1042"}},"in_reply_to_id":149478359},"pull_request":{"url":"https://api.github.com/repos/busyorg/busy/pulls/1042","id":151136335,"html_url":"https://github.com/busyorg/busy/pull/1042","diff_url":"https://github.com/busyorg/busy/pull/1042.diff","patch_url":"https://github.com/busyorg/busy/pull/1042.patch","issue_url":"https://api.github.com/repos/busyorg/busy/issues/1042","number":1042,"state":"open","locked":false,"title":"Remove Google Analytics and add Segment","user":{"login":"bonustrack","id":16245250,"avatar_url":"https://avatars3.githubusercontent.com/u/16245250?v=4","gravatar_id":"","url":"https://api.github.com/users/bonustrack","html_url":"https://github.com/bonustrack","followers_url":"https://api.github.com/users/bonustrack/followers","following_url":"https://api.github.com/users/bonustrack/following{/other_user}","gists_url":"https://api.github.com/users/bonustrack/gists{/gist_id}","starred_url":"https://api.github.com/users/bonustrack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bonustrack/subscriptions","organizations_url":"https://api.github.com/users/bonustrack/orgs","repos_url":"https://api.github.com/users/bonustrack/repos","events_url":"https://api.github.com/users/bonustrack/events{/privacy}","received_events_url":"https://api.github.com/users/bonustrack/received_events","type":"User","site_admin":false},"body":"Google Analytic integration was not working since we updated to react-router v4. This PR fixes this issue and also switch from Analytics code to Segment code which give more flexibility.\r\n\r\nFixes https://github.com/busyorg/busy/projects/6#card-5480527\r\n\r\nChanges:\r\n- Remove Google Analytics code\r\n- Add Segment code\r\n- Link Google Analytics to Segment","created_at":"2017-11-07T15:01:08Z","updated_at":"2017-11-07T19:47:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a41000549ec60e35337dbc04077b075166f8eda4","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/busyorg/busy/pulls/1042/commits","review_comments_url":"https://api.github.com/repos/busyorg/busy/pulls/1042/comments","review_comment_url":"https://api.github.com/repos/busyorg/busy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/busyorg/busy/issues/1042/comments","statuses_url":"https://api.github.com/repos/busyorg/busy/statuses/b9fa44fbdcf8e6219c91a1fcf02a8042c3c18029","head":{"label":"busyorg:add-segment","ref":"add-segment","sha":"b9fa44fbdcf8e6219c91a1fcf02a8042c3c18029","user":{"login":"busyorg","id":25360286,"avatar_url":"https://avatars0.githubusercontent.com/u/25360286?v=4","gravatar_id":"","url":"https://api.github.com/users/busyorg","html_url":"https://github.com/busyorg","followers_url":"https://api.github.com/users/busyorg/followers","following_url":"https://api.github.com/users/busyorg/following{/other_user}","gists_url":"https://api.github.com/users/busyorg/gists{/gist_id}","starred_url":"https://api.github.com/users/busyorg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/busyorg/subscriptions","organizations_url":"https://api.github.com/users/busyorg/orgs","repos_url":"https://api.github.com/users/busyorg/repos","events_url":"https://api.github.com/users/busyorg/events{/privacy}","received_events_url":"https://api.github.com/users/busyorg/received_events","type":"Organization","site_admin":false},"repo":{"id":64382195,"name":"busy","full_name":"busyorg/busy","owner":{"login":"busyorg","id":25360286,"avatar_url":"https://avatars0.githubusercontent.com/u/25360286?v=4","gravatar_id":"","url":"https://api.github.com/users/busyorg","html_url":"https://github.com/busyorg","followers_url":"https://api.github.com/users/busyorg/followers","following_url":"https://api.github.com/users/busyorg/following{/other_user}","gists_url":"https://api.github.com/users/busyorg/gists{/gist_id}","starred_url":"https://api.github.com/users/busyorg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/busyorg/subscriptions","organizations_url":"https://api.github.com/users/busyorg/orgs","repos_url":"https://api.github.com/users/busyorg/repos","events_url":"https://api.github.com/users/busyorg/events{/privacy}","received_events_url":"https://api.github.com/users/busyorg/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/busyorg/busy","description":"Blockchain-based social network where anyone can earn rewards 🚀","fork":false,"url":"https://api.github.com/repos/busyorg/busy","forks_url":"https://api.github.com/repos/busyorg/busy/forks","keys_url":"https://api.github.com/repos/busyorg/busy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/busyorg/busy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/busyorg/busy/teams","hooks_url":"https://api.github.com/repos/busyorg/busy/hooks","issue_events_url":"https://api.github.com/repos/busyorg/busy/issues/events{/number}","events_url":"https://api.github.com/repos/busyorg/busy/events","assignees_url":"https://api.github.com/repos/busyorg/busy/assignees{/user}","branches_url":"https://api.github.com/repos/busyorg/busy/branches{/branch}","tags_url":"https://api.github.com/repos/busyorg/busy/tags","blobs_url":"https://api.github.com/repos/busyorg/busy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/busyorg/busy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/busyorg/busy/git/refs{/sha}","trees_url":"https://api.github.com/repos/busyorg/busy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/busyorg/busy/statuses/{sha}","languages_url":"https://api.github.com/repos/busyorg/busy/languages","stargazers_url":"https://api.github.com/repos/busyorg/busy/stargazers","contributors_url":"https://api.github.com/repos/busyorg/busy/contributors","subscribers_url":"https://api.github.com/repos/busyorg/busy/subscribers","subscription_url":"https://api.github.com/repos/busyorg/busy/subscription","commits_url":"https://api.github.com/repos/busyorg/busy/commits{/sha}","git_commits_url":"https://api.github.com/repos/busyorg/busy/git/commits{/sha}","comments_url":"https://api.github.com/repos/busyorg/busy/comments{/number}","issue_comment_url":"https://api.github.com/repos/busyorg/busy/issues/comments{/number}","contents_url":"https://api.github.com/repos/busyorg/busy/contents/{+path}","compare_url":"https://api.github.com/repos/busyorg/busy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/busyorg/busy/merges","archive_url":"https://api.github.com/repos/busyorg/busy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/busyorg/busy/downloads","issues_url":"https://api.github.com/repos/busyorg/busy/issues{/number}","pulls_url":"https://api.github.com/repos/busyorg/busy/pulls{/number}","milestones_url":"https://api.github.com/repos/busyorg/busy/milestones{/number}","notifications_url":"https://api.github.com/repos/busyorg/busy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/busyorg/busy/labels{/name}","releases_url":"https://api.github.com/repos/busyorg/busy/releases{/id}","deployments_url":"https://api.github.com/repos/busyorg/busy/deployments","created_at":"2016-07-28T09:27:04Z","updated_at":"2017-11-07T16:28:31Z","pushed_at":"2017-11-07T16:46:58Z","git_url":"git://github.com/busyorg/busy.git","ssh_url":"git@github.com:busyorg/busy.git","clone_url":"https://github.com/busyorg/busy.git","svn_url":"https://github.com/busyorg/busy","homepage":"https://busy.org/","size":59557,"stargazers_count":111,"watchers_count":111,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":40,"mirror_url":null,"archived":false,"open_issues_count":106,"forks":40,"open_issues":106,"watchers":111,"default_branch":"new-design"}},"base":{"label":"busyorg:new-design","ref":"new-design","sha":"05a64dbd649080a633c13759c35830f7c80db6c2","user":{"login":"busyorg","id":25360286,"avatar_url":"https://avatars0.githubusercontent.com/u/25360286?v=4","gravatar_id":"","url":"https://api.github.com/users/busyorg","html_url":"https://github.com/busyorg","followers_url":"https://api.github.com/users/busyorg/followers","following_url":"https://api.github.com/users/busyorg/following{/other_user}","gists_url":"https://api.github.com/users/busyorg/gists{/gist_id}","starred_url":"https://api.github.com/users/busyorg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/busyorg/subscriptions","organizations_url":"https://api.github.com/users/busyorg/orgs","repos_url":"https://api.github.com/users/busyorg/repos","events_url":"https://api.github.com/users/busyorg/events{/privacy}","received_events_url":"https://api.github.com/users/busyorg/received_events","type":"Organization","site_admin":false},"repo":{"id":64382195,"name":"busy","full_name":"busyorg/busy","owner":{"login":"busyorg","id":25360286,"avatar_url":"https://avatars0.githubusercontent.com/u/25360286?v=4","gravatar_id":"","url":"https://api.github.com/users/busyorg","html_url":"https://github.com/busyorg","followers_url":"https://api.github.com/users/busyorg/followers","following_url":"https://api.github.com/users/busyorg/following{/other_user}","gists_url":"https://api.github.com/users/busyorg/gists{/gist_id}","starred_url":"https://api.github.com/users/busyorg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/busyorg/subscriptions","organizations_url":"https://api.github.com/users/busyorg/orgs","repos_url":"https://api.github.com/users/busyorg/repos","events_url":"https://api.github.com/users/busyorg/events{/privacy}","received_events_url":"https://api.github.com/users/busyorg/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/busyorg/busy","description":"Blockchain-based social network where anyone can earn rewards 🚀","fork":false,"url":"https://api.github.com/repos/busyorg/busy","forks_url":"https://api.github.com/repos/busyorg/busy/forks","keys_url":"https://api.github.com/repos/busyorg/busy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/busyorg/busy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/busyorg/busy/teams","hooks_url":"https://api.github.com/repos/busyorg/busy/hooks","issue_events_url":"https://api.github.com/repos/busyorg/busy/issues/events{/number}","events_url":"https://api.github.com/repos/busyorg/busy/events","assignees_url":"https://api.github.com/repos/busyorg/busy/assignees{/user}","branches_url":"https://api.github.com/repos/busyorg/busy/branches{/branch}","tags_url":"https://api.github.com/repos/busyorg/busy/tags","blobs_url":"https://api.github.com/repos/busyorg/busy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/busyorg/busy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/busyorg/busy/git/refs{/sha}","trees_url":"https://api.github.com/repos/busyorg/busy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/busyorg/busy/statuses/{sha}","languages_url":"https://api.github.com/repos/busyorg/busy/languages","stargazers_url":"https://api.github.com/repos/busyorg/busy/stargazers","contributors_url":"https://api.github.com/repos/busyorg/busy/contributors","subscribers_url":"https://api.github.com/repos/busyorg/busy/subscribers","subscription_url":"https://api.github.com/repos/busyorg/busy/subscription","commits_url":"https://api.github.com/repos/busyorg/busy/commits{/sha}","git_commits_url":"https://api.github.com/repos/busyorg/busy/git/commits{/sha}","comments_url":"https://api.github.com/repos/busyorg/busy/comments{/number}","issue_comment_url":"https://api.github.com/repos/busyorg/busy/issues/comments{/number}","contents_url":"https://api.github.com/repos/busyorg/busy/contents/{+path}","compare_url":"https://api.github.com/repos/busyorg/busy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/busyorg/busy/merges","archive_url":"https://api.github.com/repos/busyorg/busy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/busyorg/busy/downloads","issues_url":"https://api.github.com/repos/busyorg/busy/issues{/number}","pulls_url":"https://api.github.com/repos/busyorg/busy/pulls{/number}","milestones_url":"https://api.github.com/repos/busyorg/busy/milestones{/number}","notifications_url":"https://api.github.com/repos/busyorg/busy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/busyorg/busy/labels{/name}","releases_url":"https://api.github.com/repos/busyorg/busy/releases{/id}","deployments_url":"https://api.github.com/repos/busyorg/busy/deployments","created_at":"2016-07-28T09:27:04Z","updated_at":"2017-11-07T16:28:31Z","pushed_at":"2017-11-07T16:46:58Z","git_url":"git://github.com/busyorg/busy.git","ssh_url":"git@github.com:busyorg/busy.git","clone_url":"https://github.com/busyorg/busy.git","svn_url":"https://github.com/busyorg/busy","homepage":"https://busy.org/","size":59557,"stargazers_count":111,"watchers_count":111,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":40,"mirror_url":null,"archived":false,"open_issues_count":106,"forks":40,"open_issues":106,"watchers":111,"default_branch":"new-design"}},"_links":{"self":{"href":"https://api.github.com/repos/busyorg/busy/pulls/1042"},"html":{"href":"https://github.com/busyorg/busy/pull/1042"},"issue":{"href":"https://api.github.com/repos/busyorg/busy/issues/1042"},"comments":{"href":"https://api.github.com/repos/busyorg/busy/issues/1042/comments"},"review_comments":{"href":"https://api.github.com/repos/busyorg/busy/pulls/1042/comments"},"review_comment":{"href":"https://api.github.com/repos/busyorg/busy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/busyorg/busy/pulls/1042/commits"},"statuses":{"href":"https://api.github.com/repos/busyorg/busy/statuses/b9fa44fbdcf8e6219c91a1fcf02a8042c3c18029"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"bonustrack"}}