The Google Analytics Measurement Protocol enhances measurement for web and app streams by sending events directly to Google Analytics servers in HTTP requests. You can record server-to-server and offline interactions, and send them as Measurement Protocol events to Google Analytics, where they can be viewed in reports.
You must use tagging (gTag, Tag Manager, or Google Analytics for Firebase) to use this protocol. See key features for important information on how this Measurement Protocol works with Google Analytics.
Use cases
Here are some ways to use the Measurement Protocol:
- Tie online to offline behavior.
- Measure client-side and server-side interactions.
- Send events that happen outside standard user-interaction, like offline conversions.
- Send events from devices and apps where automatic collection isn't available, like kiosks and watches.
Read more about how to implement common use cases in the use cases guide.
Get started
See send events to learn how to send events to Google Analytics using the Measurement Protocol.
If you're implementing the Measurement Protocol for an app stream, you can start with the Send app events to Google Analytics using Measurement Protocol codelab.
Architecture
Here is an overview of the Measurement Protocol.
Key features
This section explains important information for using the Measurement Protocol. You must use gTag, Tag Manager, or Google Analytics for Firebase for tagging to use most of the Measurement Protocol features with Google Analytics.
Remarketing
Same device remarketing is supported when Google signals is turned on. For cross-device remarketing, a User ID is required.
Advertising identifiers
Advertising identifiers such as GBRAID/WBRAID collected during online
interactions are automatically joined with Measurement Protocol events using client_id
or app_instance_id
.
Privacy settings
Measurement Protocol events are joined with online interactions using
client_id
or app_instance_id
to functionally adopt user privacy settings
such as "non personalized ads" and "limit ad tracking".
Geographic and device information
Google Analytics automatically joins the most recent geographic and device
information from tagging with Measurement Protocol events using client_id
or
app_instance_id
. This ensures that your Measurement Protocol events are reflected in
reports that include geographic and device dimensions.
You can't send geographic or device information using the Measurement Protocol.
Full server-to-server
While it's 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 using gtag, GTM, or Firebase. Some event and parameter names are reserved for use through automatic collection and cannot be sent through the measurement protocol.
Rules for generating or renaming events are not automatically triggered based on events sent with measurement protocol. Your application should implement the logic to send custom events through the measurement protocol similar to the rules configured in Google Analytics UI.
Next steps
- Learn how to send events using the Measurement Protocol.
- Validate your event payloads using the Measurement Protocol Validation Server.
- Check out the protocol and event reference.