Web Analytics

Google Analytics and Chat – Part 2 – BoldChat – What are the 'chatters' doing on my site

To help get insight into how the chat application is contributing to the bottom line, we recently implemented the Google Analytics Tracking Code (GATC) for one of our clients that uses BoldChat. After doing a quick bit of research, we found that BoldChat already had a document about this on their site. This gave us a good start, but after reviewing their recommendations there are some key points related to cross-domain tracking that they missed in their instructions. This will result in a variety of problems including:
  • Everyone that opens the chat window being registered as a new visitor.
  • The loss of referral information.
  • Visit information not being tied back to your site, resulting in you not being able to segment ‘chatters’ to see what other actions they took on your site.
Basically you are just tracking the number of page views for the live chat which isn’t really that valuable. Some of the things we wanted to be able to do included:
  1. Pre-Chat page. Track how many people launched the chat window. When the window is launched there is a pre-chat form that requests a small amount of information before continuing to the chat.
  2. Chat page. Track how many people continued from the form to the chat.
  3. Segment ‘Chatters’. Compare the behaviour of those that chat with other visitor segments.
Below are the steps involved in the updated integration.

Creating the Google Analytics Tracking Code (GATC) For BoldChat

The first thing we did was update the code that is to go in the chat window to the following (web property ID’s have been removed from the getTracker call): The “if” statement ensures that the tracking code is only fired on the pre-chat and live chat pages. Note the cross-domain tracking code that has been added. The BoldChat documentation is incorrect as the sample code they provide does not implement cross-domain tracking properly and will track the visitor as a new visit. This will bloat your visits and visitors, and will not allow you to track the visitor properly through the funnel they describe. Be sure to update the _getTracker() call in the code above with the web property ID of your Google Analytics profile

Updating the Chat Window

Following are the steps that need to be completed in the BoldChat client:
  1. From the main menu of the Boldchat Interface, click on Setup > Account Setup…
  2. From the Account Setup window, click on Chats > Custom Chat Windows
  3. Select the window you wish to add tracking to
  4. Select the Branding tab
  5. Select Header/Footer group and then the Footer Include key
  6. Inside the text area on the right paste your modified code from above and save your changes

Modify GATC on Your Site

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 made on all your pages!

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: 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: 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):

Google Analytics Profile Updates

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

Analysis

Now that you’ve got the code implemented and tested, you can start the fun stuff! Analysis! An example of something you might want to try is to create an Advanced Segment for BoldChat visitors. You can do this by creating a segment for users that have seen the page “/boldchat/live-chat”. Or, if you’d also like to have the pre-chat users included in that segment you could have the segment for visitors that have seen a page that contains “/boldchat/”. Now that you’ve got the segment, apply it, and compare how these users compare to other visitor segments on your site by looking at things such as Goal Conversion Rate changes between the segments. Do visitors that engage in chat have a higher or lower conversion rate?
Cardinal Path

Share
Published by
Cardinal Path

Recent Posts

Optimizing user experiences with Digital Experience Analytics (DXA) platforms

As consumers become increasingly digitally savvy, and more and more brand touchpoints take place online,…

1 month ago

Enabling Value-Based Bidding with Google Tightlock

Marketers are on a constant journey to optimize the efficiency of paid search advertising. In…

2 months ago

Resolving “Unassigned” Traffic in GA4

Unassigned traffic in Google Analytics 4 (GA4) can be frustrating for data analysts to deal…

2 months ago

This website uses cookies.