Jivo

From Growth Agency Wiki
Revision as of 11:19, 28 November 2019 by Aaron.trevellick (talk | contribs) (Created page with "== Tracking In Tag Manager == Jivohas an API for tracking. https://www.jivochat.com/api/ To use this, create a custom HTML tag In tag manager and trigger it on any pages th...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Tracking In Tag Manager

Jivohas an API for tracking.

https://www.jivochat.com/api/

To use this, create a custom HTML tag In tag manager and trigger it on any pages the Jivochat runs on.

Add this script to the custom HTML:

<script>
function jivoDataLayerEvent( eventName ) {
	var dataLayer = window.dataLayer || [];
	dataLayer.push({'event' : 'jivo-' + eventName});
}
document.addEventListener( 'jivo_onOpen', function() { jivoDataLayerEvent( 'chat-opened' ); });
document.addEventListener( 'jivo_onMessageSent', function() { jivoDataLayerEvent( 'message-sent' ); });
document.addEventListener( 'jivo_onIntroduction', function() { jivoDataLayerEvent( 'contact-sent' ); });
</script>