Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
- Download and enable the module as usual.
- Visit
admin/config/services/intercom/settings
to specify the APP ID. Alternatively, you can edit yoursettings.php
file, which is handy for handling different environments. - Insert the following snippet into your
html.tpl.php
just before the closing<body>
tag.
if (in_array(PANTHEON_ENVIRONMENT, array('live'))) {
$conf['intercomjs_app_id'] = 'abcdefgh';
}
else {
$conf['intercomjs_app_id'] = 'ijklmnop';
}
<?php if (isset($intercomjs)): ?>
<?php print $intercomjs; ?>
<?php endif; ?>
Supporting organizations:
Project information
- Module categories: Integrations
- Created by mkudenko on , updated