-
Notifications
You must be signed in to change notification settings - Fork 12
Single page app login/logout #6
Comments
@akrikos I think it's just simply because we don't map the reset method in the integration. Wanna submit a PR? Here's a an example of how we do it for Taplytics https://github.com/segment-integrations/analytics.js-integration-taplytics/blob/a18ca216ff81bf721bbfcdd3bc436afa5d590ff7/lib/index.js#L125 |
@f2prateek I put together a first attempt at a PR based on the example you provided but something is not quite working. Mind taking a look and pointing me in the right direction? On a related note, I have noticed that if I manually call |
@JoshuaRH Ah I see, I think if you add another line in the reset method: Then when the user logs out, call |
Thanks for the guidance @f2prateek. Something in the
|
ah weird, I wonder what the pattern of instrumenting this without segment is. I've reached out to their support describing the case, hopefully they can shed more light on it. |
Not sure if this will help, but what I had to do in my workaround was:
|
@akrikos when did you call reset in your example? |
Also throwing into the mix that I am totally new to this codebase, so I could be messing up something in testing. First step, it looks at though simply overriding
|
@f2prateek ah, good catch. I do actually have code in my logout that's custom as well. if (window.analytics) {
window.analytics.user().reset()
if (window.intercom) {
window.Intercom.('shutdown')
}
} |
I'll go see if I can figure out what's going on too. |
Yeah, I hit the same wall as @JoshuaRH. The usual things I'd start doing in this situation aren't feasible with my current knowledge of the code base:
Is there some documentation you can point me to that explains any of that? |
@akrikos You can run |
@akrikos The manual |
@f2prateek Any news on getting this fixed? |
+1. Seems to me like a privacy issue for me but intercom.io is doing the same thing on their website. |
Is there a current recommended workaround for this issue I can do while this issue remains open? |
Anyone made any progress with this? We've tried a few versions of the suggestion here but we can't get it to function in any normal way. |
This doesn't just affect single page applications; when a new user hits the login or welcome pages then the intercom messenger shows the previous user session. |
The
|
Hi @f2prateek, as part of the monorepo migration, this issue has been moved to new issue. Our engineers have been notified and will prioritize and work on it ASAP. Thank you! For more information, see README.md. |
From segment-boneyard/integration-intercom#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 invokewindow.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?
The text was updated successfully, but these errors were encountered: