Instantly share code, notes, and snippets.

What would you like to do?
Add snippet to Magento site
* /app/design/frontend/default/your_theme/template/page/intercom-io.phtml
// Settings for the app.
if( $this->helper('customer')->isLoggedIn() ): ?>
<?php $customer = Mage::helper('customer')->getCustomer()->getData(); ?>
<script id="IntercomSettingsScriptTag">
var intercomSettings = {
app_id: 'your_app_id',
email: "<?php echo $customer['email']; ?>",
name: "<?php echo $customer['firstname'] . ' ' . $customer['lastname']; ?>",
user_id: "<?php echo $customer['entity_id']; ?>",
created_at: <?php echo time( $customer['created_at'] ); ?>
(function() {
var i=function(){i.c(arguments)};i.q=[];
function async_load() {
var s = document.createElement('script');
s.type = 'text/javascript'; s.async = true;
s.src = '';
var x = document.getElementsByTagName('script')[0];
x.parentNode.insertBefore(s, x);
if (window.attachEvent) {
window.attachEvent('onload', async_load);
} else {
window.addEventListener('load', async_load, false);
<?php endif; ?>
* This goes in the theme's layout/local.xml file (in the <default> section)
* - it could also go into the page.xml file...
<reference name="before_body_end">
<block type="core/template" template="page/intercom-io.phtml" />

This comment has been minimized.

tipeveryday commented Mar 20, 2013

Any advice on activating this in the dashboard?


This comment has been minimized.


davekelly commented Apr 2, 2013

Sorry for not getting back to you @tipeveryday - I didn't get a comment notification.

I'm not sure what you mean by "activating it" - once a user is registered and is signed in to Magento they should show up in Intercom automatically. I don't think I needed to activate anything.


This comment has been minimized.

olmoszamudio commented Jun 9, 2014

Thank you very much! I've created phtml file and I uploaded via ftp. Now what should I do to display it in my backend, or turn it into


This comment has been minimized.

lancasterjones commented Jan 4, 2017

Hey @davekelly,
I couldn't load the intercom-io.phtml file from the local.xml nor page.xml
What I did instead was include the code in the template's header.phtml file.
It's all working nicely on Magento 19.3.1



This comment has been minimized.

vnm230 commented Jan 18, 2017

Hi @davekelly,

We have created phtml file here app/design/frontend/default/my_theme/template/page/intercom-io.phtml
and updated app id. then added this code in local.xml file

<reference name="before_body_end">
    <block type="core/template" template="page/intercom-io.phtml" />

But still that popup/chat window is not coming out.

Please let me know if you can help with this.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment