Install the code snippet

If you are just getting started with Intercom and want to begin by integrating the Intercom code snippet, check out our detailed document on getting started with the Intercom code integration here.If you've already created your Intercom by importing users you'll find the Intercom JS snippet in your Intercom Setup Guide.

  • Copy and paste the code right before the closing tag of every page where users will be logged in.
  • You can install Intercom in your development environment first. It doesn't have to be installed in production to get started.

Important: You must edit the code to include the email address and signed-up date of the user who is currently logged in. This involves some basic server-side code to swap in some variables. Here is an example of the code snippet:

var intercomSettings = {
  app_id: 'bk7tlzy4',
  email: 'john.doe@example.com', // Replace with email of current user
  user_id: '9876', // Optional: Replace with a unique identifier that won't change
  created_at: 1234567890, // Replace with Unix timestamp of signup date   
  name: 'John Doe' // Optional: Replace with real name if available
};

To complete the code install activate Intercom by logging into your app in your development environment.

If you run into problems during the install, send an email to team@intercom.io. You can also see some of the common issues people come across.

Did this answer your question?