Full text


Integrating Google Analytics

with BoldChat.




Live chat has come of age. Gone are the days when chatting with website visitors was seen only as a way to reduce support costs. For some time now, savvy Internet retailers have utilized intelligent chat interactions as a key contributor in the sales cycle. This white paper explains how to implement Google’s Analytics code to uncover, at a granular level, exactly how important live chat can be to increase close-rates online.


This paper is geared toward persons who are comfortable working with HTML code. Advanced HTML coding is not required but some level of familiarity with the basics of HTML will be helpful.

Experience implementing Google Analytics code and setting up Goal Funnels is a requirement for anyone wanting to following the best practices contained herein.

Why Integrate Google Analytics with BoldChat?

While BoldChat is the ‘system-of-record’ when it comes to your site’s chat data, it is useful to integrate some of that data into your overall web analytics view. Doing this allows you to see how chat influences other key website metrics and it allows you to view ‘chatters’ as a unique visitor type. Once chats are tracked with Google Analytics, you’ll be able to set up funnels to track how chat influences goals, set chat itself as a goal in order to discover what type of traffic is likely to engage you in chat, create Advanced Segments to view chatters as standalone visitor types.

Example Integration Outcome: View the keywords that drive chats

• Thousands of customers, worldwide

• Reliable 99.99% uptime • The industry’s best value • Fully deploys in days • 24/7 support

• Proven installs across vertical markets


BoldChat, a brand of LogMeIn, Inc. 2024 N. Woodlawn Suite 350 Wichita, KS 67208 Phone: (866)753-9933 (316)630-9933 Email: Website:


<script type="text/javascript">

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "' type='text/javascript'%3E%3C/script%3E"));


<script type="text/javascript">

If(document.body.className.substring(document.body.className.indexOf(‘page-‘)+5)==’1’){ var pageTracker = _gat._getTracker("UA-XXXXXX-X");

pageTracker._setDomainName(“none”); pageTracker._initData();

pageTracker._trackPageview(“/boldchat/live-chat”); }


3. Once you have the modified code copied, access the BoldChat client and Setup > Account Setup > Chats > Custom Chat Windows > New/Edit.

4. From the New/Edit Custom Chat Window form, select the Brandings tab and check the Custom Branding radio button under Branding Type. 5. Then select Header/Footer > Footer Include from the

bottom half of the form.

6. Inside the text area on the right, paste the code you just created and Save your changes. If other code already exists, paste this code below it.

Technical Implementation Details

There are three steps to integrating BoldChat into Google Analytics:

1. Modify Google Analytics code & add it to the chat window.

2. Modify existing on-page analytics code 3. Modify BoldChat button code

Modify Google Analytics Code/Add to Chat Window Footer

The Google Analytics code that will be pasted into the chat window footer needs to be modified as follows in order to work appropriately.

The text below that appears in red needs to be modified and then added to the existing Google Analytics code that you access through your Google account. 

To make things easier for you, simply follow these simple steps to generate the complete code snippet you’ll need: 1. Replace the “UA-XXXXXX-X” string in the code

below with what is provided in the Google Analyt-ics code associated with your Google account. 2. Once you've made the change specified in #1 to the

code below, copy the entire snippet, making sure that everything in the box is included.


Modify Existing On-Page Google Analytics Code

If you do not already implement cross-domain tracking, you'll have to make the following modifications to your on-page Google Analytics Tracking Code. Remember, these changes have to be made on all your pages.

<script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://w-ww."); document.write(unescape("%3Cscript src='" + gaJsHost + "' type='text/javas-cript'%3E%3C/script%3E")); </script>

<script type="text/javascript">     try {

    var pageTracker = _gat._getTracker("UA-XXXXXX-X");     pageTracker._setAllowLinker(true);     pageTracker._setAllowHash(false);     pageTracker._setDomainName("none");     pageTracker._trackPageview();     } catch (err) {} </script>

Analytics data sent from the chat window will come from You will need to be sure that you don't have any filters created that will prevent this infor-mation from being collected by Google Analytics. If you do, adjust your filters appropriately to allow data from

Modify the Live Chat Button Code

The on-page HTML button code must be modified to use the _getLinkerUrl function so that the Google Analytics visitor information will be passed to the chat window. Add the following JavaScript before the button code:

<script type="text/javascript">

    function launchChatWindow(chatURL) {     if (typeof pageTracker == 'object') {,          'Chat123456789123456789',     'toolbar=0,scrollbars=1,location=0,statusbar=0,     menubar=0,resizable=1,width=470,height=400');     }     } </script>

Note: Be sure to replace 'Chat123456789123456789' with the value provided in your button HTML by BoldChat Then modify the button code by replacing the onClick event with the following code:

onclick="launchChatWindow(<url>);return false;">

Note: You will need to update the url passed into the function to match the url from the html code in the onClick event given by BoldChat.

The result will look something like the following with your own numbers in the URL (these numbers have been changed from the original code):

onclick="launchChatWindow(' 24682468&amp;wdid=9876543210987654321&amp;url=' + escape(document.location.href));return false;">

Using Funnels

For a given conversion event (sale, newsletter sign-up, filling out an email form, etc..) two Google funnels will need to be set up. The first funnel will not include live chat but the second one will. Used together, these two funnels will allow website administrators to calculate how many conversions occurred with a live chat interac-tion as an antecedent.

The Funnel without Live Chat

For a given conversion event, users will need to create a funnel which doesn’t include live chat as part of the conversion process. In reality, the funnel need only include the last step of the conversion process, as this will provide the total number of conversions that occurred both with and without a live chat interaction. In our example, the conversion event is simply visiting the “contact us” page. The first funnel is:


The 11 chats are true exits from the funnel

*A note about chats as an exit page: if you see chat as an exit page, it truly is an exit from the funnel. We feel it is important to track this in order to gauge operator effectiveness in the sales process.

Homepage 54 (exit) 20 /boldchat/live-chat 11 /compare_models.jsp 2 /accessories.jsp 1 /celluar_phones.jsp 1 17 (31%) proceeded to About Us 37 Live Chat 2

Live Chat Contact Us

2 2 (100%)

proceeded to Live Chat Contact Us

100.00% Funnel Conversion Rate



For more information: Phone: (866)753-9933


Chat with us, start a trial or download more resources like this one at:

BoldChat is owned by LogMeIn, Inc. For more information, please visit

If you include other steps in the funnel, it is important that they are truly steps that users must take in order to reach the final conversion event. If users can arrive at the final step in any other way besides going through the funnel, then your data will be inaccurate. In our example, we assume that the only way to arrive at the contact us page is to follow the funnel.

It is important that the Google Analytics code be modi-fied so that when a chat is launched from your site, Analytics will understand that the chat is resident on your domain. Our modifications also enable the system to recognize real chat interactions and not just launches of the pre-chat form.

The Funnel with Live Chat

The live chat funnel for any given conversion event

should only include two steps – the live chat window itself and the same conversion page as the funnel without chat. This simple two-step funnel will tell you how many of the conversions had a live chat before or during conversion.

When setting up this funnel, the “Step 1” URL you input into the Google Analytics setup screen will be:


Also, it is important that you check the “Required Step” check box next to the first step.

The Funnels Together

The first funnel will show the total number of the speci-fied conversions, how many exited via chat, and the second funnel will show how many of those conversions involved a live chat.

BoldChat is a market-leading live chat solution enabling businesses to quickly and effectively engage visitors on their websites. BoldChat is offered in different editions and includes other integrated communications technologies like email management, SMS management, and co-browsing. Organizations of all sizes – from small proprietorships to large ecommerce enterprises – can drive more conversions and higher customer satisfaction by using BoldChat.

All rights reserved, LogMeIn © 2014 | 320 Summer Street, Boston, MA 02210






Related subjects :