Skip to content

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

Open
@SegmentDestinationsBot

Description

@SegmentDestinationsBot

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');
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions