Linking Livechatoo with Google Analytics

prepojenie_s_GA

Connecting chat with Google Analytics is possible by using callbacks, specifically onchatopened and onchatstart.

Onchatstart callback performs defined function just once – when chat starts. Bellow provided function MyOnChatStart counts every started chat to Google Analytics.

event-category

 Onchatopened callback performs defined function at every action on web (click) with opened chat window, including chat start. By using onchatopened callback is possible to log how much orders visitors made, while using Livechatoo – conversion. Also, it’s possible to count amount of all orders made with opened chat. Google Analytics supports only integers so float amounts will be rounded. Bellow provided function MyOnChatOpened counts amount of all orders made with opened chat.

event-action
Both functions (MyOnChatStart and MyOnChatOpened) are called from primary javascript code by callbacks. Modified code will have the following syntax:

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">