{"action":"created","comment":{"url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/pulls/comments/69659531","id":69659531,"diff_hunk":"@@ -19,7 +19,7 @@ var time = require('unix-time');\n exports.track = function(msg, settings){\n   var eventName = msg.event();\n   var appEvents = settings.appEvents;\n-  if (appEvents && appEvents[eventName]) {\n+  if (appEvents && appEvents[eventName] && (appEvents[eventName]!==\"null\") ) {","path":"lib/mapper.js","position":5,"original_position":5,"commit_id":"5dfb2e887572f2b322b85a4ee1c956aabb35c783","original_commit_id":"5dfb2e887572f2b322b85a4ee1c956aabb35c783","user":{"login":"f2prateek","id":843979,"avatar_url":"https://avatars.githubusercontent.com/u/843979?v=3","gravatar_id":"","url":"https://api.github.com/users/f2prateek","html_url":"https://github.com/f2prateek","followers_url":"https://api.github.com/users/f2prateek/followers","following_url":"https://api.github.com/users/f2prateek/following{/other_user}","gists_url":"https://api.github.com/users/f2prateek/gists{/gist_id}","starred_url":"https://api.github.com/users/f2prateek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/f2prateek/subscriptions","organizations_url":"https://api.github.com/users/f2prateek/orgs","repos_url":"https://api.github.com/users/f2prateek/repos","events_url":"https://api.github.com/users/f2prateek/events{/privacy}","received_events_url":"https://api.github.com/users/f2prateek/received_events","type":"User","site_admin":false},"body":"Not sure I understand this yet. Can you send a screenshot of the settings in the Segment UI when `appEvents[eventName]!==\"null\"` is true?","created_at":"2016-07-06T00:17:55Z","updated_at":"2016-07-06T00:17:55Z","html_url":"https://github.com/segment-integrations/integration-facebook-app-events/pull/4#discussion_r69659531","pull_request_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/pulls/comments/69659531"},"html":{"href":"https://github.com/segment-integrations/integration-facebook-app-events/pull/4#discussion_r69659531"},"pull_request":{"href":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/pulls/4","id":76361606,"html_url":"https://github.com/segment-integrations/integration-facebook-app-events/pull/4","diff_url":"https://github.com/segment-integrations/integration-facebook-app-events/pull/4.diff","patch_url":"https://github.com/segment-integrations/integration-facebook-app-events/pull/4.patch","issue_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/issues/4","number":4,"state":"open","locked":false,"title":"Custom Events retain name when unmapped, and app version is passed successfully.","user":{"login":"myclamm","id":6260204,"avatar_url":"https://avatars.githubusercontent.com/u/6260204?v=3","gravatar_id":"","url":"https://api.github.com/users/myclamm","html_url":"https://github.com/myclamm","followers_url":"https://api.github.com/users/myclamm/followers","following_url":"https://api.github.com/users/myclamm/following{/other_user}","gists_url":"https://api.github.com/users/myclamm/gists{/gist_id}","starred_url":"https://api.github.com/users/myclamm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/myclamm/subscriptions","organizations_url":"https://api.github.com/users/myclamm/orgs","repos_url":"https://api.github.com/users/myclamm/repos","events_url":"https://api.github.com/users/myclamm/events{/privacy}","received_events_url":"https://api.github.com/users/myclamm/received_events","type":"User","site_admin":false},"body":"This PR fixes two bugs.\r\n\r\n**Bug 1:** Custom events that were not mapped to any fb standard events in the segment UI were always being passed to FB as \"event name: null\".\r\n**Cause:** null values from the settings object get stringified by Segment, which was causing eventName to pass a truthy test even when eventName was null.\r\n**Fixed:** with commit https://github.com/segment-integrations/integration-facebook-app-events/commit/9ed6def8306ddebaddd49e3efbcc343a91591fde\r\n\r\n**Bug 2:** All Custom events were being passed to FB with app version listed as \"undefined\".\r\n**Cause:**  Facebook's custom_events parameter requires _appVersion as a field, otherwise \"App Version\" gets set to undefined in Facebook.\r\n**Fixed:** with commit https://github.com/segment-integrations/integration-facebook-app-events/commit/91b45e38b9062d7330e46976853eab62e23f21b1\r\n","created_at":"2016-07-06T00:05:38Z","updated_at":"2016-07-06T00:17:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"41ed5b2c9b15c40ac69b6a1b4feeada1079c1d09","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/pulls/4/commits","review_comments_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/pulls/4/comments","review_comment_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/pulls/comments{/number}","comments_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/issues/4/comments","statuses_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/statuses/5dfb2e887572f2b322b85a4ee1c956aabb35c783","head":{"label":"segment-integrations:customUnmappedEvents","ref":"customUnmappedEvents","sha":"5dfb2e887572f2b322b85a4ee1c956aabb35c783","user":{"login":"segment-integrations","id":11207740,"avatar_url":"https://avatars.githubusercontent.com/u/11207740?v=3","gravatar_id":"","url":"https://api.github.com/users/segment-integrations","html_url":"https://github.com/segment-integrations","followers_url":"https://api.github.com/users/segment-integrations/followers","following_url":"https://api.github.com/users/segment-integrations/following{/other_user}","gists_url":"https://api.github.com/users/segment-integrations/gists{/gist_id}","starred_url":"https://api.github.com/users/segment-integrations/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/segment-integrations/subscriptions","organizations_url":"https://api.github.com/users/segment-integrations/orgs","repos_url":"https://api.github.com/users/segment-integrations/repos","events_url":"https://api.github.com/users/segment-integrations/events{/privacy}","received_events_url":"https://api.github.com/users/segment-integrations/received_events","type":"Organization","site_admin":false},"repo":{"id":59525369,"name":"integration-facebook-app-events","full_name":"segment-integrations/integration-facebook-app-events","owner":{"login":"segment-integrations","id":11207740,"avatar_url":"https://avatars.githubusercontent.com/u/11207740?v=3","gravatar_id":"","url":"https://api.github.com/users/segment-integrations","html_url":"https://github.com/segment-integrations","followers_url":"https://api.github.com/users/segment-integrations/followers","following_url":"https://api.github.com/users/segment-integrations/following{/other_user}","gists_url":"https://api.github.com/users/segment-integrations/gists{/gist_id}","starred_url":"https://api.github.com/users/segment-integrations/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/segment-integrations/subscriptions","organizations_url":"https://api.github.com/users/segment-integrations/orgs","repos_url":"https://api.github.com/users/segment-integrations/repos","events_url":"https://api.github.com/users/segment-integrations/events{/privacy}","received_events_url":"https://api.github.com/users/segment-integrations/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/segment-integrations/integration-facebook-app-events","description":"The Facebook App Events server-side integration. ","fork":false,"url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events","forks_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/forks","keys_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/keys{/key_id}","collaborators_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/teams","hooks_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/hooks","issue_events_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/issues/events{/number}","events_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/events","assignees_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/assignees{/user}","branches_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/branches{/branch}","tags_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/tags","blobs_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/git/refs{/sha}","trees_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/git/trees{/sha}","statuses_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/statuses/{sha}","languages_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/languages","stargazers_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/stargazers","contributors_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/contributors","subscribers_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/subscribers","subscription_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/subscription","commits_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/commits{/sha}","git_commits_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/git/commits{/sha}","comments_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/comments{/number}","issue_comment_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/issues/comments{/number}","contents_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/contents/{+path}","compare_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/compare/{base}...{head}","merges_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/merges","archive_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/downloads","issues_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/issues{/number}","pulls_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/pulls{/number}","milestones_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/milestones{/number}","notifications_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/labels{/name}","releases_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/releases{/id}","deployments_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/deployments","created_at":"2016-05-23T23:30:33Z","updated_at":"2016-06-08T17:49:45Z","pushed_at":"2016-07-06T00:05:39Z","git_url":"git://github.com/segment-integrations/integration-facebook-app-events.git","ssh_url":"git@github.com:segment-integrations/integration-facebook-app-events.git","clone_url":"https://github.com/segment-integrations/integration-facebook-app-events.git","svn_url":"https://github.com/segment-integrations/integration-facebook-app-events","homepage":"https://segment.com/docs/integrations/facebook-app-events","size":34,"stargazers_count":14,"watchers_count":14,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":14,"default_branch":"master"}},"base":{"label":"segment-integrations:master","ref":"master","sha":"982f038116e923426ff2971d255d89f543ad907e","user":{"login":"segment-integrations","id":11207740,"avatar_url":"https://avatars.githubusercontent.com/u/11207740?v=3","gravatar_id":"","url":"https://api.github.com/users/segment-integrations","html_url":"https://github.com/segment-integrations","followers_url":"https://api.github.com/users/segment-integrations/followers","following_url":"https://api.github.com/users/segment-integrations/following{/other_user}","gists_url":"https://api.github.com/users/segment-integrations/gists{/gist_id}","starred_url":"https://api.github.com/users/segment-integrations/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/segment-integrations/subscriptions","organizations_url":"https://api.github.com/users/segment-integrations/orgs","repos_url":"https://api.github.com/users/segment-integrations/repos","events_url":"https://api.github.com/users/segment-integrations/events{/privacy}","received_events_url":"https://api.github.com/users/segment-integrations/received_events","type":"Organization","site_admin":false},"repo":{"id":59525369,"name":"integration-facebook-app-events","full_name":"segment-integrations/integration-facebook-app-events","owner":{"login":"segment-integrations","id":11207740,"avatar_url":"https://avatars.githubusercontent.com/u/11207740?v=3","gravatar_id":"","url":"https://api.github.com/users/segment-integrations","html_url":"https://github.com/segment-integrations","followers_url":"https://api.github.com/users/segment-integrations/followers","following_url":"https://api.github.com/users/segment-integrations/following{/other_user}","gists_url":"https://api.github.com/users/segment-integrations/gists{/gist_id}","starred_url":"https://api.github.com/users/segment-integrations/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/segment-integrations/subscriptions","organizations_url":"https://api.github.com/users/segment-integrations/orgs","repos_url":"https://api.github.com/users/segment-integrations/repos","events_url":"https://api.github.com/users/segment-integrations/events{/privacy}","received_events_url":"https://api.github.com/users/segment-integrations/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/segment-integrations/integration-facebook-app-events","description":"The Facebook App Events server-side integration. ","fork":false,"url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events","forks_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/forks","keys_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/keys{/key_id}","collaborators_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/teams","hooks_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/hooks","issue_events_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/issues/events{/number}","events_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/events","assignees_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/assignees{/user}","branches_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/branches{/branch}","tags_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/tags","blobs_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/git/refs{/sha}","trees_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/git/trees{/sha}","statuses_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/statuses/{sha}","languages_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/languages","stargazers_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/stargazers","contributors_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/contributors","subscribers_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/subscribers","subscription_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/subscription","commits_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/commits{/sha}","git_commits_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/git/commits{/sha}","comments_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/comments{/number}","issue_comment_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/issues/comments{/number}","contents_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/contents/{+path}","compare_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/compare/{base}...{head}","merges_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/merges","archive_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/downloads","issues_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/issues{/number}","pulls_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/pulls{/number}","milestones_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/milestones{/number}","notifications_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/labels{/name}","releases_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/releases{/id}","deployments_url":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/deployments","created_at":"2016-05-23T23:30:33Z","updated_at":"2016-06-08T17:49:45Z","pushed_at":"2016-07-06T00:05:39Z","git_url":"git://github.com/segment-integrations/integration-facebook-app-events.git","ssh_url":"git@github.com:segment-integrations/integration-facebook-app-events.git","clone_url":"https://github.com/segment-integrations/integration-facebook-app-events.git","svn_url":"https://github.com/segment-integrations/integration-facebook-app-events","homepage":"https://segment.com/docs/integrations/facebook-app-events","size":34,"stargazers_count":14,"watchers_count":14,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/pulls/4"},"html":{"href":"https://github.com/segment-integrations/integration-facebook-app-events/pull/4"},"issue":{"href":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/issues/4"},"comments":{"href":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/segment-integrations/integration-facebook-app-events/statuses/5dfb2e887572f2b322b85a4ee1c956aabb35c783"}}}}
{"actor":{"display_login":"f2prateek"}}