Jivo: Difference between revisions

From Growth Agency Wiki
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..."
 
No edit summary
 
(One intermediate revision by one other user not shown)
Line 3: Line 3:
Jivohas an API for tracking.
Jivohas an API for tracking.


https://www.jivochat.com/api/
https://www.jivochat.co.uk/docs/widget/


To use this, create a custom HTML tag In tag manager and trigger it on any pages the Jivochat runs on.
To use this, create a custom HTML tag In tag manager and trigger it on any pages the Jivochat runs on.
Line 15: Line 15:
dataLayer.push({'event' : 'jivo-' + eventName});
dataLayer.push({'event' : 'jivo-' + eventName});
}
}
document.addEventListener( 'jivo_onOpen', function() { jivoDataLayerEvent( 'chat-opened' ); });
function jivo_onOpen() { jivoDataLayerEvent( 'chat-opened' ); }
document.addEventListener( 'jivo_onMessageSent', function() { jivoDataLayerEvent( 'message-sent' ); });
function jivo_onMessageSent() { jivoDataLayerEvent( 'message-sent' ); }
document.addEventListener( 'jivo_onIntroduction', function() { jivoDataLayerEvent( 'contact-sent' ); });
function jivo_onIntroduction() { jivoDataLayerEvent( 'contact-sent' ); }
</script>
</script>
</pre>
</pre>

Latest revision as of 14:31, 1 August 2024

Tracking In Tag Manager

Jivohas an API for tracking.

https://www.jivochat.co.uk/docs/widget/

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>