How to set up tawk.to for Google Analytics tracking

[Desktop]

With Google Analytics tracking, you can keep an eye on your site’s activity and see results for custom events you set up with Google Tag Manager. For example, you can include custom events to track when a chat starts, when a chat ends or when a new ticket is created.

Prerequisites

Before setting up Google Analytics tracking for tawk.to, you’ll need the following:


  1. A Google Analytics account and property
  2. A tawk.to account

Retrieving the global site tag

Please note: If you already have the Google tag set up for your website, you can skip this section.


1 - Log in to your Google Analytics dashboard and navigate to Admin.

2 - In the Admin view, select Setup Assistant under the Property column. This will open up a new panel.

3 - Under Data collection, select Collect website and app data. That should open options for setting up a Data Stream.

4 - In the setup, select Web to open a new panel.

5 - In the panel, enter your website’s URL and desired Data Stream name. Then, click the Create stream button.

6 - Next, the panel will redirect you to the installation instructions panel. Select Install manually to find your Google tag.

Sending events to Google Analytics

To send custom events to your Google Analytics account, you can use the gtag object that was loaded from the Google tag (gtag.js).


For example, we can use the tawk.to onChatStarted JS API to send a chat_started event to your Google Analytics account. Place this code after your tawk.to widget code.

If you need help or have questions, reach out to our support team by scheduling a call

Was this article helpful?

62 out of 101 liked this article

Still need help? Message Us