{"action":"closed","number":106,"pull_request":{"url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/pulls/106","id":189793217,"node_id":"MDExOlB1bGxSZXF1ZXN0MTg5NzkzMjE3","html_url":"https://github.com/reactioncommerce/reaction-next-starterkit/pull/106","diff_url":"https://github.com/reactioncommerce/reaction-next-starterkit/pull/106.diff","patch_url":"https://github.com/reactioncommerce/reaction-next-starterkit/pull/106.patch","issue_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/issues/106","number":106,"state":"closed","locked":false,"title":"feat: add segment tracking","user":{"login":"mikemurray","id":42217,"node_id":"MDQ6VXNlcjQyMjE3","avatar_url":"https://avatars3.githubusercontent.com/u/42217?v=4","gravatar_id":"","url":"https://api.github.com/users/mikemurray","html_url":"https://github.com/mikemurray","followers_url":"https://api.github.com/users/mikemurray/followers","following_url":"https://api.github.com/users/mikemurray/following{/other_user}","gists_url":"https://api.github.com/users/mikemurray/gists{/gist_id}","starred_url":"https://api.github.com/users/mikemurray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikemurray/subscriptions","organizations_url":"https://api.github.com/users/mikemurray/orgs","repos_url":"https://api.github.com/users/mikemurray/repos","events_url":"https://api.github.com/users/mikemurray/events{/privacy}","received_events_url":"https://api.github.com/users/mikemurray/received_events","type":"User","site_admin":false},"body":"Issue: #58 \r\nImpact: **minor**\r\nType: **feat**\r\n\r\n## Issue\r\n\r\nAdd an event tracking API to the app and have that data be sent to Segment.\r\n\r\n## Solution\r\n\r\n- Add segment scripts using th next js example https://github.com/zeit/next.js/tree/canary/examples/with-segment-analytics\r\n- Use the NYT react tracking lib https://github.com/NYTimes/react-tracking\r\n- Create a custom dispatch and HOC decorators under `lib/tracking`\r\n- Add a `config/analytics` directory with the segment tracking implementation as well as an example for creating more\r\n- Add an ENV var `SEGMENT_ANALYTICS_WRITE_KEY` to `.env.example` for easy configuration\r\n- Create sample tracking HOC's for tracking a product and product list, to be fully implemented in the future by #56 and #57 \r\n- Added docs to outlining how to set up. use, and customize tracking.\r\n- Add the `_app.js` override component with the root level tracking\r\n\r\n## Breaking\r\n\r\n- `this.props.url` is now `this.props.router`\r\n\r\n## Testing\r\n\r\n1. Create a segment account and get the API key\r\n2. Start the app and navigate around\r\n3. In the segment dashboard under `sources > javascript > debugger` see events being tracked","created_at":"2018-05-22T21:09:36Z","updated_at":"2018-06-01T18:59:51Z","closed_at":"2018-06-01T18:59:51Z","merged_at":"2018-06-01T18:59:51Z","merge_commit_sha":"f963409a2901b20a6713b722dd626fd294d103bb","assignee":{"login":"mikemurray","id":42217,"node_id":"MDQ6VXNlcjQyMjE3","avatar_url":"https://avatars3.githubusercontent.com/u/42217?v=4","gravatar_id":"","url":"https://api.github.com/users/mikemurray","html_url":"https://github.com/mikemurray","followers_url":"https://api.github.com/users/mikemurray/followers","following_url":"https://api.github.com/users/mikemurray/following{/other_user}","gists_url":"https://api.github.com/users/mikemurray/gists{/gist_id}","starred_url":"https://api.github.com/users/mikemurray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikemurray/subscriptions","organizations_url":"https://api.github.com/users/mikemurray/orgs","repos_url":"https://api.github.com/users/mikemurray/repos","events_url":"https://api.github.com/users/mikemurray/events{/privacy}","received_events_url":"https://api.github.com/users/mikemurray/received_events","type":"User","site_admin":false},"assignees":[{"login":"mikemurray","id":42217,"node_id":"MDQ6VXNlcjQyMjE3","avatar_url":"https://avatars3.githubusercontent.com/u/42217?v=4","gravatar_id":"","url":"https://api.github.com/users/mikemurray","html_url":"https://github.com/mikemurray","followers_url":"https://api.github.com/users/mikemurray/followers","following_url":"https://api.github.com/users/mikemurray/following{/other_user}","gists_url":"https://api.github.com/users/mikemurray/gists{/gist_id}","starred_url":"https://api.github.com/users/mikemurray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikemurray/subscriptions","organizations_url":"https://api.github.com/users/mikemurray/orgs","repos_url":"https://api.github.com/users/mikemurray/repos","events_url":"https://api.github.com/users/mikemurray/events{/privacy}","received_events_url":"https://api.github.com/users/mikemurray/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/pulls/106/commits","review_comments_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/pulls/106/comments","review_comment_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/issues/106/comments","statuses_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/statuses/2f65f8025112021b3984afa3679c137cb7025682","head":{"label":"reactioncommerce:feat-58-mikemurray-segment","ref":"feat-58-mikemurray-segment","sha":"2f65f8025112021b3984afa3679c137cb7025682","user":{"login":"reactioncommerce","id":5605462,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU2MDU0NjI=","avatar_url":"https://avatars0.githubusercontent.com/u/5605462?v=4","gravatar_id":"","url":"https://api.github.com/users/reactioncommerce","html_url":"https://github.com/reactioncommerce","followers_url":"https://api.github.com/users/reactioncommerce/followers","following_url":"https://api.github.com/users/reactioncommerce/following{/other_user}","gists_url":"https://api.github.com/users/reactioncommerce/gists{/gist_id}","starred_url":"https://api.github.com/users/reactioncommerce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reactioncommerce/subscriptions","organizations_url":"https://api.github.com/users/reactioncommerce/orgs","repos_url":"https://api.github.com/users/reactioncommerce/repos","events_url":"https://api.github.com/users/reactioncommerce/events{/privacy}","received_events_url":"https://api.github.com/users/reactioncommerce/received_events","type":"Organization","site_admin":false},"repo":{"id":127972704,"node_id":"MDEwOlJlcG9zaXRvcnkxMjc5NzI3MDQ=","name":"reaction-next-starterkit","full_name":"reactioncommerce/reaction-next-starterkit","owner":{"login":"reactioncommerce","id":5605462,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU2MDU0NjI=","avatar_url":"https://avatars0.githubusercontent.com/u/5605462?v=4","gravatar_id":"","url":"https://api.github.com/users/reactioncommerce","html_url":"https://github.com/reactioncommerce","followers_url":"https://api.github.com/users/reactioncommerce/followers","following_url":"https://api.github.com/users/reactioncommerce/following{/other_user}","gists_url":"https://api.github.com/users/reactioncommerce/gists{/gist_id}","starred_url":"https://api.github.com/users/reactioncommerce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reactioncommerce/subscriptions","organizations_url":"https://api.github.com/users/reactioncommerce/orgs","repos_url":"https://api.github.com/users/reactioncommerce/repos","events_url":"https://api.github.com/users/reactioncommerce/events{/privacy}","received_events_url":"https://api.github.com/users/reactioncommerce/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/reactioncommerce/reaction-next-starterkit","description":null,"fork":false,"url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit","forks_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/forks","keys_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/teams","hooks_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/hooks","issue_events_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/issues/events{/number}","events_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/events","assignees_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/assignees{/user}","branches_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/branches{/branch}","tags_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/tags","blobs_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/git/refs{/sha}","trees_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/statuses/{sha}","languages_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/languages","stargazers_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/stargazers","contributors_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/contributors","subscribers_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/subscribers","subscription_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/subscription","commits_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/commits{/sha}","git_commits_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/git/commits{/sha}","comments_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/comments{/number}","issue_comment_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/issues/comments{/number}","contents_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/contents/{+path}","compare_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/merges","archive_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/downloads","issues_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/issues{/number}","pulls_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/pulls{/number}","milestones_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/milestones{/number}","notifications_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/labels{/name}","releases_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/releases{/id}","deployments_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/deployments","created_at":"2018-04-03T21:50:03Z","updated_at":"2018-05-31T18:51:30Z","pushed_at":"2018-06-01T18:59:51Z","git_url":"git://github.com/reactioncommerce/reaction-next-starterkit.git","ssh_url":"git@github.com:reactioncommerce/reaction-next-starterkit.git","clone_url":"https://github.com/reactioncommerce/reaction-next-starterkit.git","svn_url":"https://github.com/reactioncommerce/reaction-next-starterkit","homepage":null,"size":2169,"stargazers_count":25,"watchers_count":25,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":23,"license":null,"forks":0,"open_issues":23,"watchers":25,"default_branch":"master"}},"base":{"label":"reactioncommerce:master","ref":"master","sha":"01e89ba2a41eb313f60ec65577208f9a0ca4b51f","user":{"login":"reactioncommerce","id":5605462,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU2MDU0NjI=","avatar_url":"https://avatars0.githubusercontent.com/u/5605462?v=4","gravatar_id":"","url":"https://api.github.com/users/reactioncommerce","html_url":"https://github.com/reactioncommerce","followers_url":"https://api.github.com/users/reactioncommerce/followers","following_url":"https://api.github.com/users/reactioncommerce/following{/other_user}","gists_url":"https://api.github.com/users/reactioncommerce/gists{/gist_id}","starred_url":"https://api.github.com/users/reactioncommerce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reactioncommerce/subscriptions","organizations_url":"https://api.github.com/users/reactioncommerce/orgs","repos_url":"https://api.github.com/users/reactioncommerce/repos","events_url":"https://api.github.com/users/reactioncommerce/events{/privacy}","received_events_url":"https://api.github.com/users/reactioncommerce/received_events","type":"Organization","site_admin":false},"repo":{"id":127972704,"node_id":"MDEwOlJlcG9zaXRvcnkxMjc5NzI3MDQ=","name":"reaction-next-starterkit","full_name":"reactioncommerce/reaction-next-starterkit","owner":{"login":"reactioncommerce","id":5605462,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU2MDU0NjI=","avatar_url":"https://avatars0.githubusercontent.com/u/5605462?v=4","gravatar_id":"","url":"https://api.github.com/users/reactioncommerce","html_url":"https://github.com/reactioncommerce","followers_url":"https://api.github.com/users/reactioncommerce/followers","following_url":"https://api.github.com/users/reactioncommerce/following{/other_user}","gists_url":"https://api.github.com/users/reactioncommerce/gists{/gist_id}","starred_url":"https://api.github.com/users/reactioncommerce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reactioncommerce/subscriptions","organizations_url":"https://api.github.com/users/reactioncommerce/orgs","repos_url":"https://api.github.com/users/reactioncommerce/repos","events_url":"https://api.github.com/users/reactioncommerce/events{/privacy}","received_events_url":"https://api.github.com/users/reactioncommerce/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/reactioncommerce/reaction-next-starterkit","description":null,"fork":false,"url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit","forks_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/forks","keys_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/teams","hooks_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/hooks","issue_events_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/issues/events{/number}","events_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/events","assignees_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/assignees{/user}","branches_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/branches{/branch}","tags_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/tags","blobs_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/git/refs{/sha}","trees_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/statuses/{sha}","languages_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/languages","stargazers_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/stargazers","contributors_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/contributors","subscribers_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/subscribers","subscription_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/subscription","commits_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/commits{/sha}","git_commits_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/git/commits{/sha}","comments_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/comments{/number}","issue_comment_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/issues/comments{/number}","contents_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/contents/{+path}","compare_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/merges","archive_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/downloads","issues_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/issues{/number}","pulls_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/pulls{/number}","milestones_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/milestones{/number}","notifications_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/labels{/name}","releases_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/releases{/id}","deployments_url":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/deployments","created_at":"2018-04-03T21:50:03Z","updated_at":"2018-05-31T18:51:30Z","pushed_at":"2018-06-01T18:59:51Z","git_url":"git://github.com/reactioncommerce/reaction-next-starterkit.git","ssh_url":"git@github.com:reactioncommerce/reaction-next-starterkit.git","clone_url":"https://github.com/reactioncommerce/reaction-next-starterkit.git","svn_url":"https://github.com/reactioncommerce/reaction-next-starterkit","homepage":null,"size":2169,"stargazers_count":25,"watchers_count":25,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":23,"license":null,"forks":0,"open_issues":23,"watchers":25,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/pulls/106"},"html":{"href":"https://github.com/reactioncommerce/reaction-next-starterkit/pull/106"},"issue":{"href":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/issues/106"},"comments":{"href":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/issues/106/comments"},"review_comments":{"href":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/pulls/106/comments"},"review_comment":{"href":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/pulls/106/commits"},"statuses":{"href":"https://api.github.com/repos/reactioncommerce/reaction-next-starterkit/statuses/2f65f8025112021b3984afa3679c137cb7025682"}},"author_association":"MEMBER","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"aldeed","id":3012067,"node_id":"MDQ6VXNlcjMwMTIwNjc=","avatar_url":"https://avatars1.githubusercontent.com/u/3012067?v=4","gravatar_id":"","url":"https://api.github.com/users/aldeed","html_url":"https://github.com/aldeed","followers_url":"https://api.github.com/users/aldeed/followers","following_url":"https://api.github.com/users/aldeed/following{/other_user}","gists_url":"https://api.github.com/users/aldeed/gists{/gist_id}","starred_url":"https://api.github.com/users/aldeed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aldeed/subscriptions","organizations_url":"https://api.github.com/users/aldeed/orgs","repos_url":"https://api.github.com/users/aldeed/repos","events_url":"https://api.github.com/users/aldeed/events{/privacy}","received_events_url":"https://api.github.com/users/aldeed/received_events","type":"User","site_admin":false},"comments":1,"review_comments":24,"maintainer_can_modify":false,"commits":62,"additions":770,"deletions":33,"changed_files":34}}
{"actor":{"display_login":"aldeed"}}