Experimental project

This is a sandbox project, which contains experimental code for developer use only.

Provides JS integration with Intercom.IO.

Here at Webscope we've been doing an API intergration with Intercom. Unfortunately, the current Intercom API requires PHP 5.4, and most Drupal 7 sites run on PHP 5.3. So we ended up using their JavaScript API, which turned out to be just enough for our needs.

What this module does, is that it injects a bit of JavaScript into the page template and submits events to Intercom.

Features

  • Tracking of basic user info - user name, user id, email, created date.
  • Page view events.
  • Tracking of user 1 can be disabled (all users are tracked by default).

Installation instructions

  1. Download and enable the module as usual.
  2. Visit admin/config/services/intercom/settings to specify the APP ID. Alternatively, you can edit your settings.php file, which is handy for handling different environments.
  3.   if (in_array(PANTHEON_ENVIRONMENT, array('live'))) {
        $conf['intercomjs_app_id'] = 'abcdefgh';
      }
      else {
        $conf['intercomjs_app_id'] = 'ijklmnop';
      }
    
  4. Insert the following snippet into your html.tpl.php just before the closing <body> tag.
  5. <?php if (isset($intercomjs)): ?>
      <?php print $intercomjs; ?>
    <?php endif; ?>
Supporting organizations: 

Project information