User properties describe segments of your user base, such as language preference or geographic location. Analytics automatically logs some user properties. If you want to collect additional properties, you can set up to 25 additional user properties per project. See Custom user properties to learn how to set and register user properties.
User properties enhance user segmentation, but user property data is often only available server-side. The measurement protocol allows you to augment client-side measurements with server-side data, which is typically infeasible using only client-side solutions.
Some user property names are reserved and cannot be used in measurements:
Additionally, user property names cannot begin with:
In the following example, your CRM has a user property (
would like to add to your measurements.
customer_tier can be set to one of
standard. To get this user property in your reports, you would do
First, have the client send an
add_payment_info event along with a call to a
server API that has access to your CRM system:
Your server then augments the measurement with the
customer_tier user property
using the measurement protocol:
This user property reports the two segments
See Sending events for full details on how to send events via the Measurement Protocol.