Compare Universal Analytics and Google Analytics 4 measurement protocols

This page explains the differences between key measurement protocol features in Universal Analytics (UA) and Google Analytics 4 (GA4).

Review the limitations of measurement protocol.


This section covers the general parameters from UA.

Field UA GA4
Tracking ID / Property ID Requires tid parameter. Requires a Measurement ID and API secret.
Mask IP Optional. Not available.
Disable Advertising Permission Optional. Has an optional consent parameter at the root of the document.
Data Source ds is an optional parameter for the source of the data being sent (for example, web or app). Doesn't require a data source as it is determined by the data stream type. The Measurement ID is sent as a query parameter which is related to the data stream.
Cache Buster z is an optional property that prevents browsers from caching hits. Not required since browser hits must be sent using gTag.


This section covers the user parameters from UA.

Field UA GA4
Client ID cid is an optional parameter that is used to uniquely identify the user. GA4 requires a unique identifier for the client. If it is a browser, send client_id from gtag. If it's a mobile app, send app_instance_id which you can get from the Google Analytics for Firebase SDK.
User ID uid is required if cid isn't present. uid is a unique identifier for a user. user_id is optional.


This section covers the session parameters from UA.

Field UA GA4
Session control Used to control the session duration. In GA4, sessions cannot be controlled using measurement protocol. You can provide an existing session_id from gtag or Firebase.
IP Override The IP address of the user. Not available.
User Agent Override The User Agent of the browser. There is no way to override the user agent in GA4.
Geographical Override The geographical location of the user. GA4 does not provide a geo location for any hits, and there is no way to provide one.

Traffic sources

This section covers the traffic sources parameters from UA.

Field UA GA4
Campaign details Use the campaign fields. GA4 provides an event, campaign_details, which takes in the same data as parameters to the event. In GA4, the parameters names are different than in UA.
Other traffic source data UA provides parameters for document referrer, Google Ads ID, and Google Display Ads ID. In GA4, these parameters are automatically added to the request when client_id or app_instance_id is provided.

System information

This section covers the system information parameters from UA.

UA has optional parameters for system information like screen resolution, viewport size, and more. In GA4, many parameters are automatically collected by the Google Tag (gtag) while others have been deprecated, like Flash version. If you want to continue to collect data for the deprecated parameters, create custom events and parameters.


This section covers the hit parameters from UA.

UA provides a required parameter t which is used to log a page view or screen view. GA4 uses an event model, and these events are automatically collected by the Google Tag (gtag) and the Google Analytics for Firebase SDK.


This section covers the apps parameters from UA.

Apps fields. In GA4, most app information is automatically collected by the Google Analytics for Firebase SDK once the stream has been configured.


This section covers the events parameters from UA.

In UA, events were sent using a combination of category, action, and label. In GA4, events are core to the data model. Almost all data is sent as an event. You can use the Measurement Protocol to send recommended events or custom events.


This section covers the ecommerce parameters from UA.

In UA, various combinations of parameters were used to send ecommerce information. In GA4, most ecommerce information is sent with the purchase event. Review the ecommerce documentation for more details.

In order to get attribution information, the purchase event should be sent within 24 hours of the session end.

Social interactions

This section covers the social interactions parameters from UA.

In UA, the parameters sn, sa, and st were used to indicate the social network, action, and target. In GA4, social interactions can be measured using recommended events like share or select_content.

For any other action, use custom events.


This section covers the timing parameters from UA.

In UA, timing parameters were used for web vitals. In GA4, there are no events for web vitals. If you want to measure web vitals in GA4, you can use custom events. Here is a guide on capturing GA4 vitals.


This section covers the exceptions parameters from UA.

In UA, the parameters exd and exf were used for exceptions. In GA4, there is no event for exceptions, but one can be created using custom dimensions and metrics.

Custom Dimensions / Metrics

This section covers the custom dimensions and metrics parameters from UA.

In UA, custom dimensions and metrics were sent using parameters of the form cd<dimensionIndex> and cm<metricIndex>, respectively. In GA4, custom events and metrics can be sent using measurement protocol. It's up to you to specify the event and parameter name and values. Custom dimensions and metrics require additional configuration before they are available in reporting.