Tracking key events in Google Analytics is an important step to measure your website performance. You can use Google Tag Manager to track your chat widget events in Google Analytics. When a visitor performs an action related to an interaction with your Conversations chat widget, the data is pushed to your Google Analytics account. You can track a large variety of events and access your Conversations events live in Google Analytics.
Before you start
- Ensure that your use of Google Analytics is compliant with local data protection regulations. Learn more about Google Analytics privacy controls.
- Copy and save your Google Analytics 4 measurement ID. To learn more, check Google Analytics help article.
❓Which Conversations events can I track?
Event name | Description |
Chat initiated by visitor | A visitor initiated the chat by sending a message |
Chat initiated by agent |
non-interaction event An agent initiated the chat by writing a message in the existing conversation after a period of inactivity |
Chat accepted by agent |
non-interaction event |
Chat rated | A visitor rated the conversation |
Targeted chat shown |
non-interaction event |
Targeted chat accepted by visitor | A visitor replied to the chat initiated by a trigger |
Targeted chat rejected by visitor | A visitor closed the chat initiated by a trigger |
Pre-chat form shown |
non-interaction event |
Pre-chat form submitted | Contact form was submitted by a visitor |
Bot scenario shown |
non-interaction event |
Bot scenario started by visitor | A visitor started a chatbot scenario |
Bot reply option clicked | A visitor clicked on a reply option in a chatbot scenario |
⚙️ Set up Conversations events in Google Tag Manager
If the Google Analytics tracker is already installed on your website, the Conversations chat widget automatically sends events to Google Analytics without any additional configuration. However, if you installed Google Analytics 4 via Google Tag Manager, it requires additional tags to be configured ⬇️.
- In the Google Tag Manager dashboard, click Add a new tag.
- Optional: If you haven't connected Google Tag Manager with your Google Analytics account:
- Name your tag, e.g. Google Analytics Conversations.
- Click Tag Configuration and choose Google Analytics: GA4 Configuration.
- Paste your Measurement ID. To learn how to retrieve your Measurement ID, check Google Analytics help article.
- Click Triggering and choose a trigger, e.g., All Pages.
- Click Save in the top right corner.
- Google Tag Manager is connected to your Google Analytics account. You now need to configure the Conversations events tag:
- Click Add a new tag.
- Name the tag, e.g. Conversations GA Events.
- Click Tag Configuration and choose Google Analytics: GA4 Event.
- From the Configuration Tag drop-down, choose the tag that allowed you to connect Google Tag Manager to your Google Analytics account, in our example Google Analytics Conversations.
- In the Event name field, enter
{{Event}}
. - Click Triggering.
- In the Choose a trigger window, click the + (plus) sign to create a new trigger.
- Configure the trigger parameters:
- Name the trigger, e.g. Conversation Events, and click Trigger Configuration.
- In the Other section of the Choose trigger type window, choose Custom Event.
- In the Event name field, paste the following text to create the Conversations event triggers:
Chat initiated by visitor|Chat initiated by agent|Chat accepted by agent|Chat rated|Targeted chat shown|Targeted chat accepted by visitor|Targeted chat rejected by visitor|Pre-chat form shown|Pre-chat form submitted|Bot scenario shown|Bot scenario started by visitor|Bot reply option clicked
- Check Use regex matching.
- Click Save to save your trigger.
- Click Save again to save the tag.
- Click Submit to push changes and complete the installation.
You should see the Conversations events in the Google Analytics 4 dashboard.
If there are several Google Analytics trackers on your website, the Conversations widget will send events to the first tracker found. To send events to a specific tracker, paste the following code before the Conversations main widget code and replace G-ABC1234567 with your Measurement ID:
<script>
window.BrevoConversationsSetup = {
gaTrackingId: 'G-ABC1234567'
};
</script>
<!-- Brevo Conversations widget code →
🧐 Track Conversations events in Google Analytics
To check your event reports, go to your Google Analytics account and go to Reports > Engagement > Events.
🔁 Mark Conversations tracked events as conversions
You can mark important user interactions with the Conversations chat widget as conversion events to help measure conversion.
💾 Existing events
- From your Google Analytics dashboard, go to Admin.
- In the Property column, click Events.
- Toggle the switch next to the name of the Conversations event you want to mark as conversion in the Mark as conversion column .
🆕 New events
You can also configure new events as conversions before an event appears in Analytics:
- From your Google Analytics dashboard, go to Admin.
- In the Property column, click Events.
- Click Create event.
- Click Create and give a name to the custom event conversion, e.g. Chat_rated.
- In Matching conditions, ensure that the parameter event_name is set to equals.
- In the Value field, add the name of any Conversations you want to mark as conversion, here Chat rated. Check the list of trackable Conversations events to choose the events you want to mark as conversions.
- Click Create to save the changes.
- Go back to Admin and click Conversions.
- Click New conversion.
- In the New event name field, enter the name of the event you created in step 2, e.g. Chat_rated.
- Click Save.
- In your Google Ads dashboard, click Settings and choose Switch to Expert Mode.
💡 Good to knowIf your Settings icon is called Tools and Settings, it means you are already in expert mode. - Go to Tools and Settings > Measurement > Conversions.
- Click New conversion action and choose Website as the kind of conversions you want to track.
- In the Website domain field, enter the name of your website and click Scan.
- Once the scan is done, scroll down the page and click Add a conversion action manually.
- Set up your conversion action details:
- In the Goal and action optimization section, select the category this action belongs to, e.g. Other.
- In the Conversion name field, add the name of any Conversations you want to mark as conversion, e.g. Chat initiated by visitor. Check the list of trackable Conversations events to choose the events you want to mark as conversions.
- In the Value section, check the Don’t use a value for this conversion action checkbox.
- Leave other settings as they are and click Done.
- Click Save and continue.
- To finish your conversion setup, you need to add its code to your website. Choose Use Google Tag Manager even if you add scripts manually.
- Copy the Conversion ID and Conversion labels and save them on your device.
- Click Done.
-
Paste the following code to your website code, right before the Brevo Conversations chat widget and replace:
-
EVENT_NAME with the name of the Conversations event you chose in step 6, here it would be Chat initiated by visitor.
-
CONVERSION_ID with the Conversion ID you copied from the previous step.
-
CONVERSION_LABEL with the Conversion label you copied from the previous step.
<script>
window.BrevoConversationsSetup = {
onAnalyticEvent: function(eventName) {
if (eventName === 'EVENT_NAME') { /* replace EVENT_NAME with the name of the event */
var id = 'CONVERSION_ID'; /* Conversion ID from the step 8 */
var label = 'CONVERSION_LABEL'; /* Conversion label from the step 8 */
var img = new Image(1, 1);
img.src = 'https://www.googleadservices.com/pagead/conversion/'+id+'/?label='+label+'&script=0';
}
}
};
</script>
<!-- Brevo Conversations widget code →
-
Congratulations! 🎉 Your conversion is created. You can now analyze the effectiveness of your advertising campaigns. You can create conversions with other chat events. To learn more about the different Conversations trackable events, check our dedicated section Which Conversations events can I track?.
🤔 Have a question?
If you have a question, feel free to contact our support team by creating a ticket from your account. If you don't have an account yet, you can contact us here.
If you’re looking for help with a project using Brevo, we can match you with the right certified Brevo expert partner.