Created
May 7, 2019 14:15
-
-
Save lizardking8610/8b860a68ef224408eb3e194bd56792c7 to your computer and use it in GitHub Desktop.
Continually Chatbot Google Analytics 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
<!-- GA Tracking events with Continually JS API --> | |
<script> | |
continually.on('ready', function(api) { | |
api.on('startConversation', function(event) { | |
ga('send', 'event', { | |
eventCategory: 'Continually Conversations', | |
eventAction: 'Started Conversation', | |
eventLabel: event.conversationId, | |
}); | |
}); | |
api.on('emailCapture', function(event) { | |
ga('send', 'event', { | |
eventCategory: 'Continually Conversations', | |
eventAction: 'Email captured', | |
eventLabel: event.conversationId, | |
}); | |
gtag_report_conversion('http://example.com/your-link'); | |
}); | |
}); | |
</script> | |
<!-- End GA Tracking events --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment