Jivo: Difference between revisions
Jump to navigation
Jump to search
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..." |
Ben.robson (talk | contribs) |
||
| Line 15: | Line 15: | ||
dataLayer.push({'event' : 'jivo-' + eventName}); | dataLayer.push({'event' : 'jivo-' + eventName}); | ||
} | } | ||
function jivo_onOpen() { jivoDataLayerEvent( 'chat-opened' ); } | |||
function jivo_onMessageSent() { jivoDataLayerEvent( 'message-sent' ); } | |||
function jivo_onIntroduction() { jivoDataLayerEvent( 'contact-sent' ); } | |||
</script> | </script> | ||
</pre> | </pre> | ||
Revision as of 15:11, 3 May 2022
Tracking In Tag Manager
Jivohas an API for tracking.
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});
}
function jivo_onOpen() { jivoDataLayerEvent( 'chat-opened' ); }
function jivo_onMessageSent() { jivoDataLayerEvent( 'message-sent' ); }
function jivo_onIntroduction() { jivoDataLayerEvent( 'contact-sent' ); }
</script>