jesselperry provided a solution to JakeHower’s problem of installing Intercom script on his Discourse installation. The task requires calling the logged-in user’s email address and name. jesselperry shared a JavaScript code snippet that can be embedded under Customize > CSS/HTML.
However, JakeHower encountered issues with the code not working, possibly due to the lack of SSL setup on the forum or his use of SSO via Wordpress. jesselperry offered to run a test to identify the issue and inquired about the matching of user emails between Wordpress/Discourse and the Intercom admin dashboard.
jakeHower confirmed that the user emails match and provided access details to the forum for further assistance.
It’s fairly straightforward to set up, since Discourse provides the JSON and you can just read that client-side. I’m sure you could do it a more complicated way, but this is essentially how I’ve done it with Javascript. I modified my code slightly since you’re looking for email and name, but you should be able to just embed the below code under Customize > CSS/HTML and be up & running.
Note the two places in the code of YOUR_INTERCOM_APP_ID and YOUR_DISCOURSE_DOMAIN.
Also FYI the current Intercom Messenger doesn’t play well on iOS devices on Discourse. But they could be working on an updated Messenger. And if I were to have used an updated Intercom Messenger, I would say that it works very well on iOS now
I’ll run a quick test with this code to see what the issue is. Before I do, I assume that your Wordpress/Discourse user emails match up with users you’ve already loaded into the Intercom admin dashboard?
SSO isn’t an issue. I actually have the same set up.