Social Intents GTM Event Listener
Track Social Intents chat (Slack/Teams integration) in GTM. Monitor chat open, messages, and offline events with chatAction variable.
social-intentsslackteamschatgtmga4support
Event fired
socialIntents_ActionKey variable
chatActionSocial Intents
Overview
Social Intents routes website chat conversations directly to Slack, Microsoft Teams, or other platforms. This listener tracks widget interactions using Social Intents' JavaScript callback system.
Event fired: socialIntents_Action
Variable: chatAction
Tracked Events
| chatAction | Description |
|---|---|
chat opened | Widget expands |
chat closed | Widget collapses |
message sent | Visitor sends message |
message received | Team replies via Slack/Teams |
offline form submitted | Offline contact form |
pre-chat submitted | Pre-chat form |
chat ended | Session ends |
Installation
html
<!-- GTM Custom HTML Tag: Social Intents Listener -->
<script>
(function() {
function siPush(action, extra) {
window.dataLayer = window.dataLayer || [];
window.dataLayer.push(Object.assign({
'event': 'socialIntents_Action',
'chatAction': action
}, extra || {}));
}
var initSI = function() {
if (typeof window.socialIntents === 'undefined') return;
socialIntents.on('open', function() { siPush('chat opened'); });
socialIntents.on('close', function() { siPush('chat closed'); });
socialIntents.on('messageSent', function() { siPush('message sent'); });
socialIntents.on('messageReceived', function() { siPush('message received'); });
socialIntents.on('offlineSubmit', function() { siPush('offline form submitted'); });
socialIntents.on('prechatSubmit', function() { siPush('pre-chat submitted'); });
socialIntents.on('chatEnded', function() { siPush('chat ended'); });
};
window.addEventListener('load', initSI);
})();
</script>Data Layer Output
json
{
"event": "socialIntents_Action",
"chatAction": "message sent"
}Trigger Configuration
Trigger Type: Custom Event
Event Name: socialIntents_Action