Last active
April 5, 2018 10:22
-
-
Save Macuzzin/592ad7365663d670fd14e98cc1ff7c9e to your computer and use it in GitHub Desktop.
Tawk Live Chat Data Layer Push Event for Google Tag Manager Tracking
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
// Tawk chat trigger | |
Tawk_API.onChatStarted = function() { | |
if(Tawk_API.isVisitorEngaged()) { | |
window.dataLayer = window.dataLayer || []; | |
window.dataLayer.push({'event': 'Chat Started'}); | |
} | |
}; | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment