Track Social Intents chat events in Google Analytics 4 (GA4). Measure chat engagement alongside your other website analytics.
Prerequisites
- 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 Chat Widgets > your widget > Settings tab and click Advanced in the left menu. Scroll to the Google Analytics card.
Enter GA4 Credentials
Enter your GA4 measurement ID (e.g., G-XXXXXXXXXX) and the GA4 API secret. Both are needed for events to be sent. Once saved, the secret is masked; leave the masked value to keep it.
Save
Click Save changes in the bar at the bottom of the page. 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 Analyze → 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.
Registering the Action Parameter as a Custom Dimension
To break down live_chat events by action in standard GA4 reports, register the parameter once:
- In GA4, go to Admin → Custom definitions → Create custom dimension
- Dimension name:
Chat Action, Scope: Event, Event parameter:action - Save. Data populates for events received after creation (allow up to 24 hours).
Tracking Chats as Key Events (Conversions)
- Go to Admin → Events → Create event and create an event named
chat_startedwith the conditionsevent_nameequalslive_chatandactionequalschat_requested. - Once it starts receiving data, toggle Mark as key event for
chat_started.
You can then use chat starts in conversion reporting, audiences, and Google Ads bidding like any other key event.
Frequently Asked Questions
Events are not showing up. Where should I look first?
Check Analyze → Realtime right after a test chat - Measurement Protocol events appear there within seconds, while standard reports can take up to 24 hours. If nothing appears in Realtime, re-check the GA4 measurement ID and API secret in the widget's Settings tab > Advanced.
Why do chat events show no page or session attribution?
Events are sent server-side, so they are not tied to the visitor's browsing session in GA4. Use the chat record in Analyze for page and referrer context; use GA4 for volume, trend, and conversion counting.