Updated: December 12, 2025
This section introduces how to Set Client ID to Custom Dimensions(aka:User Properties, User Scope Custom Dimension) in GA4.
Step 1 : Use Analytics Storage to retrieve the Client ID.
Analytics Storage is a built-in variable in GTM that can retrieve the Client ID, Session ID, and Session Number.
In GTM, click「Variables」——「New」——「Choose a variables type to begin setup…」——「 Analytics Storage」,Name it “Client ID“, and make the following settings:
Read more:How to Get Client ID to Variable in GTM?
Step 2 : Set up Custom Dimensions
Secondly, create a Google Tag: Event Settings variable in GTM and set it in “Google Analytics User Properties” as follows (If you have already created Google Tag: Event Settings, add client_id settings in Property Name):
Name it “Common Event Parameter”.
Next, set the variable Common Event Parameter to the Event Settings Variable in the GA4 basic page tracking code(Note that this setting is in the GA4 base page tracking code.), such as:
Step 3 : Preview and Release
Finally, preview testing and release:
The test is as expected and can be released and data collected.
Read More:
Step 4 : Custom Definitions
This custom dimension also needs to be registered in Custom definitions before it can be used. Create a custom dimension as follows in Custom definitions:
Step 5 : Verify data in Real-time Report
Generally, after 24 hours, we can see the data in GA4, such as:






