analytics.js-integrations icon indicating copy to clipboard operation
analytics.js-integrations copied to clipboard

[intercom] Single page app login/logout

Open SegmentDestinationsBot opened this issue 6 years ago • 7 comments

Migrated from #6 by @f2prateek

From https://github.com/segmentio/integration-intercom/issues/6

I'm using segment with intercom on a single page app that allows the user to login/logout without refreshing the page. It doesn't look like this use case was thought through though (or I'm using things incorrectly).

When I call window.analytics.user().reset() to clear the user data for a logout, the standard intercom shutdown method (window.Intercom('shutdown')) isn't called. I've worked around this by intentionally invoking the shutdown method.

However, that's created a bug with logging back in where calling analytics.identify(...) doesn't invoke window.Intercom('boot', ...). I can't as easily manually call this because I don't know where the intercom key is.

Would y'all take a look at supporting this use case?

SegmentDestinationsBot avatar Dec 10 '19 21:12 SegmentDestinationsBot

I'm having this issue but with a server side rendered app.

wachunei avatar Jan 27 '20 21:01 wachunei

Any update on this?

mcrawshaw avatar Dec 08 '20 23:12 mcrawshaw

+1

Artforge avatar Aug 20 '21 20:08 Artforge

+1

cedricdg avatar Oct 06 '21 17:10 cedricdg

+1

luisfwermann avatar Mar 23 '22 19:03 luisfwermann

+1

linkb15 avatar Nov 24 '22 07:11 linkb15

+1

posivibez avatar Nov 30 '22 04:11 posivibez