Google Analytics Event Tracking

2 min read Updated Aug 17, 2026 Integrations

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

  1. Go to your GA4 property in Google Analytics
  2. Navigate to Admin > Data Streams
  3. Click your web data stream
  4. Scroll down and click Measurement Protocol API secrets
  5. Click Create to generate a new secret

Setup

Open Widget Settings

Go to Chat Widgets > your widget > Settings tab under More settings.

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 NameAction ParameterWhen
live_chatchat_requestedVisitor initiates a chat
live_chatchat_answeredAgent joins the chat
live_chatchat_missedChat goes unanswered
live_chatchat_offline_messageVisitor 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 ReportsEngagementEvents 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.

Note: Events are sent server-side from Social Intents, not from the visitor's browser. This means they fire reliably even if the visitor has ad blockers or analytics blockers enabled.

Registering the Action Parameter as a Custom Dimension

To break down live_chat events by action in standard GA4 reports, register the parameter once:

  1. In GA4, go to AdminCustom definitionsCreate custom dimension
  2. Dimension name: Chat Action, Scope: Event, Event parameter: action
  3. Save. Data populates for events received after creation (allow up to 24 hours).

Tracking Chats as Key Events (Conversions)

  1. Go to AdminEventsCreate event and create an event named chat_started with the conditions event_name equals live_chat and action equals chat_requested.
  2. 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 ReportsRealtime 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 Measurement ID and API Secret in the widget settings.

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.