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

Is there a way to listen for outgoing message events on the client-side? #333

Open
summera opened this issue Dec 7, 2020 · 2 comments
Open

Comments

@summera
Copy link

summera commented Dec 7, 2020

Version info

  • intercom-rails version: 0.4.1
  • Rails version: 6.0.3.1

Explanation

I am attempting to track every time a user sends us a message through the Intercom chat bubble on our site. I realize there is no hook for this in the JS SDK according to the docs. I only see onHide, 'onShow and onUnreadCountChange events. However, I'm wondering if there's maybe another way to listen to outgoing HTTP requests from the Intercom iframe that's inserted on our site which would allow me to track the outgoing requests sent to Intercom to create a conversation or message. Or maybe there is some private API I could use to get a callback when this happens? I want to track these events as part of our product analytics tracking and mixpanel integration to see how many messages each user is sending to our support team. Doing this client-side would be the easiest, most ideal solution. I tried overriding XMLHttpRequest.prototype.send within the iframe's contentWindow so that I could intercept requests, but that did not seem to work. Any other ideas? I know this is more JS related, but I didn't see a better place to submit this.

@jeantristan
Copy link

Hi there,
Did you manage to find a solution to your problem?
Regards

@summera
Copy link
Author

summera commented Apr 7, 2021

Unfortunately no

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

2 participants