Install on Intercom Chat

If you use a chat widget, Tend will normally be able to pull in the email address entered in an email field into that widget.

However, if a widget is loaded within an iframe, as Intercom's is, then that widget isn't really be loading on your site so Tend won't be able to grab the email as a default.

But there are a couple of workarounds to automatically capture emails entered into Intercom chat windows.

intercom chat

Option 1 - Use Zapier to pass the visitor fingerprint and email address to Tend

Step 1: Pass visitor fingerprint to Intercom

The first step will be to send the Tend fingerprint (saved as an a_id cookie), to Intercom as a custom attribute.

Update your intercom tracking script with the following:

<script>
function getCookie(cname) {
    var name = cname + "=";
    var ca = document.cookie.split(';');
    for(var i = 0; i <ca.length; i++) {
        var c = ca[i];
        while (c.charAt(0) == ' ') {
            c = c.substring(1);
        }
        if (c.indexOf(name) == 0) {
            return c.substring(name.length, c.length);
        }
    }
    return "";
}

window.intercomSettings = {
    tend_fingerprint: getCookie('a_id'),
    app_id: 'prvhby9h'
};
</script>

The getCookie function is used to pull the Tend fingerprint (ie a_id) from the visitor's browser. Then we pass the fingerprint to Intercom with the tend_fingerprint: getCookie('a_id') line.

Step 2: Use Zapier to send the collected email to Tend.

In Zapier, create a new Intercom Lead Added to Email Trigger. When testing, you should see the fingerprint in Intercom's response (as shown in the example below).

zapier intercom chat email

Then, create a Tend Create Contact action, passing both the visitor's email, as well as their fingerprint

zapier create contact action

Option 2 - Use TendID to pass the visitor fingerprint and email address to Tend

Step 1

Get the visitorID and details from Intercom with an AJAX call: https://developers.intercom.com/v2.0/docs/intercom-javascript#section-intercomgetvisitorid

Step 2

Within the API's response push the data to Tend using TendID.

Start your free trial

2 minute set up. No credit card required.

Free Trial