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.
- 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.
- Chat page. Track how many people continued from the form to the chat.
- Segment ‘Chatters’. Compare the behaviour of those that chat with other visitor segments.
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 profileUpdating the Chat Window
Following are the steps that need to be completed in the BoldChat client:- From the main menu of the Boldchat Interface, click on Setup > Account Setup…
- From the Account Setup window, click on Chats > Custom Chat Windows
- Select the window you wish to add tracking to
- Select the Branding tab
- Select Header/Footer group and then the Footer Include key
- Inside the text area on the right paste your modified code from above and save your changes