{"action":"created","issue":{"url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-intercom/issues/31","repository_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-intercom","labels_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-intercom/issues/31/labels{/name}","comments_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-intercom/issues/31/comments","events_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-intercom/issues/31/events","html_url":"https://github.com/segment-integrations/analytics.js-integration-intercom/pull/31","id":318847710,"node_id":"MDExOlB1bGxSZXF1ZXN0MTg0OTI0Mzk4","number":31,"title":"initialize intercom with segment anonymous_id","user":{"login":"RahavLussato","id":6713560,"node_id":"MDQ6VXNlcjY3MTM1NjA=","avatar_url":"https://avatars3.githubusercontent.com/u/6713560?v=4","gravatar_id":"","url":"https://api.github.com/users/RahavLussato","html_url":"https://github.com/RahavLussato","followers_url":"https://api.github.com/users/RahavLussato/followers","following_url":"https://api.github.com/users/RahavLussato/following{/other_user}","gists_url":"https://api.github.com/users/RahavLussato/gists{/gist_id}","starred_url":"https://api.github.com/users/RahavLussato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RahavLussato/subscriptions","organizations_url":"https://api.github.com/users/RahavLussato/orgs","repos_url":"https://api.github.com/users/RahavLussato/repos","events_url":"https://api.github.com/users/RahavLussato/events{/privacy}","received_events_url":"https://api.github.com/users/RahavLussato/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-04-30T10:35:19Z","updated_at":"2018-07-30T21:33:08Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-intercom/pulls/31","html_url":"https://github.com/segment-integrations/analytics.js-integration-intercom/pull/31","diff_url":"https://github.com/segment-integrations/analytics.js-integration-intercom/pull/31.diff","patch_url":"https://github.com/segment-integrations/analytics.js-integration-intercom/pull/31.patch"},"body":"fix #30 \r\nanother thing is that i think segment intercom integration should check if the user is already identified and initialize with the identified user, currently i don't see how to do it since the user_hash is not persistent.\r\n\r\n**EDIT:**\r\nafter digging inside the lib i can see that we can also solve #6 as part of this.\r\nthe issue is that the intercom integration is not sync with segment user data on multiple cases:\r\n1. if the user not identified its not using the same anonymous id as segment.\r\n2. if the user identified and we open it on another tab without identify again its not using the user data.\r\n3. when the user data is rested intercom integration not doing shutdown and boot again with the new data.\r\n\r\nto solve all of this i added new logic that get the user data on each page call in order to be synced with segment user data and also i've added new boot mode (to solve #6) that should be used like that:\r\n```\r\nif (window.analytics) {\r\n    window.analytics.user().reset();\r\n    if (window.Intercom) {\r\n        window.Intercom('shutdown');\r\n    }\r\n    window.analytics.page('_boot');\r\n}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-intercom/issues/comments/409018964","html_url":"https://github.com/segment-integrations/analytics.js-integration-intercom/pull/31#issuecomment-409018964","issue_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-intercom/issues/31","id":409018964,"node_id":"MDEyOklzc3VlQ29tbWVudDQwOTAxODk2NA==","user":{"login":"srthurman","id":4689072,"node_id":"MDQ6VXNlcjQ2ODkwNzI=","avatar_url":"https://avatars1.githubusercontent.com/u/4689072?v=4","gravatar_id":"","url":"https://api.github.com/users/srthurman","html_url":"https://github.com/srthurman","followers_url":"https://api.github.com/users/srthurman/followers","following_url":"https://api.github.com/users/srthurman/following{/other_user}","gists_url":"https://api.github.com/users/srthurman/gists{/gist_id}","starred_url":"https://api.github.com/users/srthurman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srthurman/subscriptions","organizations_url":"https://api.github.com/users/srthurman/orgs","repos_url":"https://api.github.com/users/srthurman/repos","events_url":"https://api.github.com/users/srthurman/events{/privacy}","received_events_url":"https://api.github.com/users/srthurman/received_events","type":"User","site_admin":false},"created_at":"2018-07-30T21:33:08Z","updated_at":"2018-07-30T21:33:08Z","author_association":"NONE","body":"Hi @tobold and @RahavLussato - Sara from Segment following up here. Pardon our delay in providing an update.\r\n\r\nAfter some additional internal discussion on this matter, we've concluded we're not yet ready to move on implementing these changes. We'll need to take some extra time to make sure we have a solution that we're confident will work for all users, ideally without requiring custom implementation. I don't have a timeline to share on that just yet, but will keep this thread updated.\r\n\r\nThanks for your input here, and we appreciate your patience!"}}
{"actor":{"display_login":"srthurman"}}