Google Analytics
Fire events to your Google Analytics account from the chatbot flow.
Google Analytics (GA) is a powerful analytics tracking tool developed by Google. It enables businesses to monitor and analyze website traffic and user behavior, providing valuable insights to enhance decision-making.
With our Google Analytics integration, you can send events to your GA account using two methods:
Method 1: Client-Side Tracking
This approach allows you to fire GA events directly on the client side using GA's JavaScript methods in the browser.
Simply add a "Google Analytics" block at the desired point in your chatbot flow.
Configure the block to define the event you want to fire.

To configure a GA action block, you need to add the following details:
Measurement ID
The Measurement ID acts as a critical link between your website and the corresponding data stream in Google Analytics 4 (GA4). It ensures that all the data collected from your website is sent to the correct location within GA4.
You can find your Measurement ID in your GA4 property settings. Be sure to include it when configuring the integration to enable accurate event tracking.
Event Name
The event name specifies the action you want to track in Google Analytics. It should be written in lowercase without spaces to ensure clarity and consistency.
Examples of event names include:
chat-started
menu-selected
lead-generated
Event Parameter
An event parameter provides additional context about a user interaction on a website or app. It adds valuable details to the event being tracked, enabling deeper insights into user behavior.
For instance, consider a chatbot flow with a main menu offering multiple options. You can create an event named menu-selected and include an event parameter to specify which menu option the user selected (e.g., under the parameter "option").
You can use variables in the Event name, and while defining value to event parameters.

Method 2: Server-side tracking
For non-web channels like Instagram, WhatsApp, Facebook Messenger, and SMS, the client-side tracking method does not apply since these platforms do not support browser-based tracking.
Instead, server-side tracking is used. This involves firing Google Analytics APIs to record events directly on the server.
Configuration Requirements
To set up server-side tracking, you’ll need the following:
Measurement ID
This identifies the GA account where the events will be recorded.
API Secret
Navigate to Settings → Data Stream → Measurement Protocol API Secrets.
Click "Create" to generate your API secret.
This setup allows you to track events across various non-web platforms effectively.

Last updated
Was this helpful?