Client ID is a unique identifier that Google Analytics assigns to your browser when you visit a website. Using it, Google Analytics combines different sessions into a single user.
To get the clientId, you need to go to your Google Analytics 4 account and add a special parameter. You can do this by going to Administrator > Account Settings > Special Definitions.
Click the “Create special parameter” button and specify the following data:
- Parameter name -
analyticsCookieId - Scope - “User”
- User properties -
analyticsCookieId