Track Social Intents chat events in Google Analytics 4 (GA4). Measure chat engagement alongside your other website analytics.
Pré-requisitos
- A Google Analytics 4 property
- Your GA4 Measurement ID (starts with
G-) - A GA4 Measurement Protocol API Secret
Getting Your API Secret
- Go to your GA4 property in Google Analytics
- Navigate to Admin > Data Streams
- Click your web data stream
- Scroll down and click Measurement Protocol API secrets
- Click Create to generate a new secret
Setup
Open Widget Settings
Go to My Widgets > your widget > CSS & Javascript tab.
Enter GA4 Credentials
Enter your GA4 Measurement ID (e.g., G-XXXXXXXXXX) and the API Secret.
Save
Click Save. Events will start appearing in your GA4 reports.
Events Tracked
Social Intents sends the following events to GA4 via the Measurement Protocol:
| Event Name | Action Parameter | When |
|---|---|---|
live_chat | chat_requested | Visitor initiates a chat |
live_chat | chat_answered | Agent joins the chat |
live_chat | chat_missed | Chat goes unanswered |
live_chat | chat_offline_message | Visitor leaves an offline message |
The chat_answered event also includes an agent parameter with the agent's name.
Viewing Events in GA4
Events appear under Relatórios > Engagement > Events in Google Analytics. Look for the live_chat event and drill into the action parameter to see breakdowns by type.
You can also create custom explorations, audiences, or conversions based on these events. For example, create a conversion event for chat_requested to track chat engagement as a conversion goal.