Measurement Protocol (Google Analytics 4)

The Google Analytics Measurement Protocol for Google Analytics 4 allows developers to enhance web and app streams by sending events directly to Google Analytics servers via HTTP requests. Notably, this makes it easy to measure interactions that happen server-to-server and offline.

Use cases

Developers can use the Measurement Protocol to:

  • Tie online to offline behavior
  • Measure interactions both client-side and server-side
  • Send events that happen outside standard user-interaction (e.g. offline conversions)
  • Send events from devices and applications where automatic collection is not available (e.g. kiosks, watches, etc.)

Getting Started

To get started, see sending events. This guide will show you how to send events via HTTP using the Measurement Protocol.

If you are implementing Measurement Protocol for an app stream, you can start with the Send app events to GA4 using Measurement Protocol codelab.

Architectural Overview

sequence diagram of measurement protocol

Caveats to Measurement Protocol

Remarketing

When Google Signals is enabled, same device remarketing is supported. For cross-device remarketing, User ID is additionally required.

Geographic Information

Geographic information is only available via automatic collection from gtag, Google Tag Manager, or Google Analytics for Firebase.

Full Server-to-Server

While it is possible to send events to Google Analytics solely with measurement protocol, only partial reporting may be available. The purpose of measurement protocol is to augment existing events collected via gtag, GTM, or Firebase. Some event and parameter names are reserved for use via automatic collection and cannot be sent through the measurement protocol.

Next Steps