Skip to main content

Hi, is there any way to wait until window.Intercom(‘trackEvent’) finishes? 

I’m tracking user’s logout event then use Intercom(‘shutdown’) to clean up the cookies and reset Intercom, but it always throws this error:

Uncaught TypeError: Cannot read properties of undefined (reading 'then')
    at frame-modern.422879eb.js:1:381486

Hi @tuanna1601 !

 

Any solution would be written by you outside of the Intercom product, itself. That said, I would think you would be able to use an async/await call wouldn’t you?

Have you tried that, yet?


Hi @tuanna1601 !

 

Any solution would be written by you outside of the Intercom product, itself. That said, I would think you would be able to use an async/await call wouldn’t you?

Have you tried that, yet?

Yes, I did try that, but after looking at the source code from intercom, window.Intercom(‘trackEvent’) doesn’t return a Promise, which I need to await on.


Reply