08 Aug How do I add custom Google Analytics events?

ApexChat provides a JavaScript “hook” in our invitation which can be used to insert custom code into the chat initiation process. To use this hook, you simply need to define the Chat Interceptor function somewhere on your page, like this:

< script type=”text/javascript”>
window.ChatInterceptor = function () {
// replace this code with what your website needs:
_gaq.push([‘_trackEvent’, ‘Invitation’, ‘Click’]);
};
< /script>

This code will be executed automatically when an invitation is clicked.

Additional information about using Google Analytics is provided by Google: AnalyticsJS and GAJS.

No Comments

Sorry, the comment form is closed at this time.