GA4

Google Analytics 4 Integration

Send server-side events to GA4 via Measurement Protocol for accurate analytics data.

Overview

Google Analytics 4 Measurement Protocol allows server-side event delivery directly to GA4. Scout sends events server-side, bypassing ad blockers and ensuring complete data collection.

Scout captures events, enriches them with session data and user properties, then sends them to GA4 via Measurement Protocol. Client ID and session ID are maintained for proper attribution.

Requirements

1
GA4 Measurement ID (G-XXXXXXXX)
2
Measurement Protocol API Secret (Admin > Data Streams > Measurement Protocol)
3
A store with Scout active

Event Mapping

Scout events are transformed to GA4 recommended events:

Scout Event
GA4 Event
Purchase
purchase
AddToCart
add_to_cart
ViewContent
view_item
InitiateCheckout
begin_checkout
Search
search
Signup
sign_up

Client ID Management

Scout maintains the GA4 client_id from the _ga cookie. This ensures server-side events are attributed to the correct user session. If no client_id is available, Scout generates one.

User Properties

Scout sends user_id (from identify), session_id, and custom user properties. Enhanced measurement events (scroll, outbound click) are not supported via Measurement Protocol.

Limitations

Measurement Protocol events do not trigger GA4 real-time reports immediately. Events may take 24-48 hours to appear in standard reports. Debug mode is available for testing.

Troubleshooting

Events not in real-time reports

Measurement Protocol events have delayed processing. Use GA4 DebugView with debug_mode parameter to verify events are received.

Events not attributed to correct user

Ensure client_id from _ga cookie is captured by Scout SDK. Without client_id, events create new user sessions.