Google Analytics Event Tracking

1 min read Updated Mar 11, 2026 Integrações

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

  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 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 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 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.

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.