Loading the Intercom JavaScript library provides an Intercom JavaScript object that responds to a few methods that allow you to update users without a page refresh and interact with the message window.

Intercom('boot', intercomSettings)

If you'd like to control when Intercom is loaded, you can use the 'boot' method. This is useful in situations like a one-page Javascript based application where the user may not be logged in when the page loads. You call this method with the standard intercomSettings object.

Intercom('boot', {  
    app_id: 'abc12345',  
    email: 'john.doe@example.com',
    created_at: 1234567890,
    name: 'John Doe',
    user_id: '9876'


This method will effectively clear out any user data that you have been passing through the JS API. You should call the shutdown method anytime a user logs out of your application.



Calling the update method without any other arguments will trigger the JavaScript to look for new messages that should be displayed to the current user (the one whose details are in the window.intercomSettings variable) and show them if they exist.


Calling the update method with a JSON object of user details will update those fields on the current user in addition to logging an impression at the current URL and looking for new messages for the user.

Intercom('update', {"name": "Inigo Montoya"});


This will hide the default Intercom message window.



This will show the default Intercom message window. If there are no conversations it will open with the new message view, if there are it will open with the messages list.



To open the message window with the message list you can call



To open the message window with the new message view you can call


This function takes an optional second parameter that can be used to pre-populate the message composer.

Intercom('showNewMessage', 'pre-populated content');

So you can add a link anywhere on your site to open the new message screen with default content:

Send us <a href="#" onclick="Intercom('showNewMessage', 'Feedback on the new reports feature:')">your feedback on the reports feature</a>. 

Please note that this call is only available with our Support and Acquire products.


Gives you the ability to hook into the hide event. Requires a function argument.

Intercom('onHide', function() { // Do stuff });


Gives you the ability to hook into the show event. Requires a function argument.

Intercom('onShow', function() { // Do stuff });


Gives you the ability to hook into the the click event on your activator. Requires a function argument.

Intercom('onActivatorClick', function() { // Do stuff });


You can submit an event using the trackEvent method. This will associate the event with the currently logged in user and send it to Intercom. The final parameter is a map that can be used to send optional metadata about the event.

Intercom('trackEvent', 'invited-friend');

event with metadata:

var metadata = {
  invitee_email: 'pi@example.org',
  invite_code: 'ADDAFRIEND'
Intercom('trackEvent', 'invited-friend', metadata);

Can I make the Intercom messenger available to only selected users?

Yes, and we explain how to do that here.

Did this answer your question?