Intercom

This add-on is operated by Intercom

Understand what people do with your app and automatically message them

Intercom

Last Updated: 19 March 2014

Table of Contents

Thousands of web businesses use Intercom to see the people who use their product, send personalized messages to get them engaged, and respond to them quickly when they need help. Intercom gives you:

  • Discover: A live dashboard of all your users.
  • Engage: An outbound communications tool which lets you manually or automatically send personalised messages to your customers.
  • Respond: A customer service tool to allow you to support your customers quickly and in a personal manner.

Intercom is installed in your app with a simple JavaScript snippet (like Google Analytics), or with our Gem if you’re using Rails.

Creating a new Intercom account

You can either create a new Intercom account by adding the add-on to your app from within the marketplace or on the command line:

$ heroku addons:add intercom
-----> Adding intercom to sharp-mountain-4005... done, v18 (free)

After adding the add-on, the best way to proceed with installation is to open Intercom from within Heroku. Intercom will walk you through all the steps necessary to get installed.

Once Intercom has been added an INTERCOM_APP_ID setting will be available in the app configuration, you will include this in the Intercom javascript snippet to identify your app. This can be confirmed using the heroku config:get command.

$ heroku config:get INTERCOM_APP_ID
40x9193c

Using with Rails 3.x

Ruby on Rails applications will need to add the following entry into their Gemfile specifying the Intercom client library.

gem 'intercom-rails'

Update application dependencies with bundler.

$ bundle install

This will be replaced with value of the INTERCOM_APP_ID environment variable in production. We add it here so you can easily activate your app locally.

Generate a config file, subsitute INTERCOM_APP_ID with the value from above.

$ rails generate intercom:config INTERCOM_APP_ID

Restart your app in your development environment. If you’re using Passenger or Pow:

$ touch tmp/restart.txt

Now log into your app locally, this should activate Intercom. You can confirm by visiting the Intercom dashboard from Heroku.

Intercom tries to auto detect the currently logged in user; if your currently logged in user is not accessible in your controllers via either current_user or @user, you will need to tell Intercom how to find it. In config/initializers/intercom.rb:

config.user.current = Proc.new { @admin }

Using with a non-Rails app

Add the following JavaScript snippet before </body> on every logged-in page of your app:

<script id="IntercomSettingsScriptTag">
  var intercomSettings = {
    // TODO: The current logged in user's email address.
    email: "john.doe@example.com",

    // TODO: The current logged in user's sign-up date as a Unix timestamp.
    created_at: 1234567890,

    // TODO: Replace with the INTERCOM_APP_ID environment variable
    app_id: "YOUR_APP_ID"
  };
</script>
<script>(function(){var w=window;var d=document;var i=function(){i.c(arguments)};i.q=[];i.c=function(args){i.q.push(args)};w.Intercom=i;function l(){var s=d.createElement('script');s.type='text/javascript';s.async=true;s.src='https://api.intercom.io/api/js/library.js';var x=d.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);}if(w.attachEvent){w.attachEvent('onload',l);}else{w.addEventListener('load',l,false);}})();</script>

Make sure you review the TODO comemnts and edit the code as neccessary. After adding the javascript, log into your app localy, this should activate Intercom. You can confirm by visiting the Intercom dashboard from Heroku.

Dashboard

For more information on the features available within the Intercom dashboard please see the docs at http://docs.intercom.io/.

The Intercom dashboard is how one interacts with Intercom. Here you can:

  • See a live list of all your users
  • Automatically or manually send messages
  • Respond to any messages or support queries

The dashboard can be accessed by visiting the Heroku apps web interface and selecting the application in question. Select Intercom from the Add-ons menu.

Troubleshooting

If you are having trouble activating Intercom, please send us a mail at team@intercom.io, and we’ll help you get setup.

Migrating between plans

Use the heroku addons:upgrade command to migrate to a new plan.

$ heroku addons:upgrade intercom:messaging
-----> Upgrading intercom:messaging to sharp-mountain-4005... done, v18 ($49/mo)
       Your plan has been updated to: intercom:messaging

Removing the add-on

Intercom can be removed via the CLI.

This will destroy all associated data and cannot be undone!

$ heroku addons:remove intercom
-----> Removing intercom from sharp-mountain-4005... done, v20 (free)

Support

All Intercom support and runtime issues should be submitted via on of the Heroku Support channels. Any non-support related issues or product feedback is welcome at team@intercom.io.