Integration with Google Analytics
In addition to stats tracking for the project and each particular pop-up in your account, you can send detailed data about communications on your website to your Google Analytics account. Set up automatic sending of events from the 13Chats widgets to the Universal Analytics resource counter to combine all the analytics in convenient reports and make working with data easier.
Google Analytics 4 integration is coming soon.
The feature is available in paid plans.
What data can be transferred to Google Analytics?
The integration uses four Google Analytics entities: event, event category, event action, and event label.
Let’s analyze each in more detail.
An event is a user interaction with content that can be tracked.
You can set up sending the following events from your 13Chats project to your Google Analytics account:
- incoming message;
- new chat;
- transition by button;
- subscription to the messenger;
- email received;
- phone received.
An event category is a generic name for a recurring group of events.
Within the integration framework, the category denotes a data transmission channel:
- live chat widget: chat_widget;
- pop-up: pop_up;
- floating panel with messenger buttons: floating_button.
An event upon action determines the type of user interaction with a website element, such as “button click.”
Within the integration, an action refers to the type of event that is sent to Google Analytics.
There are six actions in total:
- incoming message (onNewMessage) — a unique message from the chat with the client. For each new message from the user, a new action is generated on the onNewMessage event.
- new chat (onNewChat) — a new unique chat in the live chat widget.
- button click (onButtonClick) — button click when selecting any of the main actions in the pop-up: “Action request,” “Chat button” and “Messenger button.”
- Messenger subscription (onFbSubscribe) — subscription to Facebook Messenger.
- received email (onEmailSet) — receiving an email from the user. For the event category, pop_up is triggered by the main action “Email subscription.” For the event category, chat_widget fires when the option “Request user’s email in a chat if there is no operator response” is enabled.
- Phone number received (onPhoneSet) — getting a phone number from the user. For the event category, pop_up is triggered by the main action “Phone request.” The event category chat_widget is triggered when the option “Ask for the user’s phone in a chat if there is no operator answer” is enabled.
Suppose the option “Request the user’s phone or email in a chat when the operator does not answer” is selected. In that case, the action corresponding to the data type entered by the user (onEmailSet when receiving an email or onPhoneSet when receiving a phone number) will be triggered.
An event label is a component that allows you to pass additional information about the tracked event.
As part of the 13Chats and Google Analytics integration, a label is used for the pop-up and floating_button event categories to separate the events within the category by action type.
There are 11 shortcuts in total:
- Call to action — action request;
- Chat button — chat button;
- Telegram;
- Snapchat;
- WhatsApp;
- Messenger;
- Instagram;
- YouTube;
- Twitter;
- Viber;
- VK.
How to set up integration with Google Analytics?
To access the integration with Google Analytics, select and pay for any paid plan.
Log in to 13Chats and select the project you want to set up the integration for. Go to the project settings (gear in the lower-left corner) to the “Integration” tab and click “Connect.”
The next step is to get a tracking ID used to set up the Google Analytics and 13Chats integration.
Sign in to an existing Google Analytics account or sign up and create a Universal Analytics counter. Go to the Admin tab and check in the property settings whether the Default URL contained the website main page with the 13Chats widget set up on it.
Go to the “Admin” tab and select “Tracking — Tracking Code” at the property level.
Select and copy a unique tracking identifier (ID).
Paste the ID into the appropriate field and check the events that you want to send to Google Analytics.
Click Apply.
In the future, you can edit or delete the integration by clicking on the pencil icon below the connection status.
To verify that the data is being passed to Google Analytics correctly, send a test message to your chat widget or execute any other event from the checkbox, and then go to your Google Analytics account and open “Realtime Report — Events.” You will see the data instantly.
You will be able to view and analyze data broken down into categories, actions, and labels in the Behavior — Events section.
For example, you need to track clicks on the buttons of the Telegram and Instagram messengers in the pop-up to understand which of the messengers is more relevant for the target audience.
If the integration is set up correctly, the following data will be sent to Google Analytics:
- event action — onButtonClick;
- event category — pop_up;
- event label — Telegram and Instagram.
To analyze the effectiveness of a particular button, select the corresponding label.
Updated: 02.02.2022