Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[intercom] Pull Request #31: initialize intercom with segment anonymous_id #317

Open
SegmentDestinationsBot opened this issue Dec 10, 2019 · 0 comments

Comments

@SegmentDestinationsBot
Copy link
Contributor

Migrated from #31 by @RahavLussato

fix #30
another 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.

EDIT:
after digging inside the lib i can see that we can also solve #6 as part of this.
the issue is that the intercom integration is not sync with segment user data on multiple cases:

  1. if the user not identified its not using the same anonymous id as segment.
  2. if the user identified and we open it on another tab without identify again its not using the user data.
  3. when the user data is rested intercom integration not doing shutdown and boot again with the new data.

to 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:

if (window.analytics) {
    window.analytics.user().reset();
    if (window.Intercom) {
        window.Intercom('shutdown');
    }
    window.analytics.page('_boot');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant