Prerequisites
- This guide is for the API-based integration and assumes that you have already installed the GA Connector script on your website. If you haven’t added our script yet, please do so by following the instructions in this article.
- Uses Zoho CRM and is connected to your Zoho SalesIQ
- If you’re using our cookie-based integration, these instructions won’t be applicable to you.
Installing the additional script
Since Zoho SalesIQ is embedded in your website via an iframe. GA Connector won’t be able to track your emails right out of the box. Aside from our main script, you’ll need to add the additional script below right after the script that Zoho SalesIQ has provided.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
<script> var gaconnector_input = document.createElement("INPUT"); gaconnector_input.setAttribute("type", "hidden"); gaconnector_input.setAttribute("id", "gaconnector_input_id"); document.body.appendChild(gaconnector_input); $zoho.salesiq.ready=function() { function trackEmail(email) { var target = document.getElementById('gaconnector_input_id'); var event = new Event('change'); target.value = email; target.dispatchEvent(event); } $zoho.salesiq.visitor.chat(function(visitid,data) { trackEmail(data.email); }); $zoho.salesiq.visitor.missed(function(visitid,data) { trackEmail(data.email); }); $zoho.salesiq.visitor.offlineMessage(function(visitid,data) { trackEmail(data.email); }); $zoho.salesiq.visitor.feedback(function(visitid,data) { trackEmail(data.email); }); $zoho.salesiq.chat.continue(function(visitid,data) { trackEmail(data.visitoremail); }); $zoho.salesiq.chat.complete(function(visitid,data) { trackEmail(data.visitoremail); }); } </script> |
WordPress
If you are using WordPress and Zoho SalesIQ’s WordPress plugin, you can add the code right after the main Zoho SalesIQ script in the plugin settings.