Once GA4 knows a user ID, you can tie together every session and event from the same person. Across sessions, devices and platforms.
That unlocks a handful of things you can't do without one:
If your site has a login, you can send your own user IDs to GA4. What that gives you, and how to set it up.
Once GA4 knows a user ID, you can tie together every session and event from the same person. Across sessions, devices and platforms.
That unlocks a handful of things you can't do without one:
Someone visits your site, clicks around and triggers events, all before there's an account or anyone logs in. At that point there's no ID yet. This is usually the bulk of your events.
When they do log in or create an account, GA4 attaches those earlier events to the User-ID after the fact. That lets you analyse what people do before they sign up.
Once someone logs out the link stops. In practice that happens rarely enough not to worry about.
Make sure you have consent and handle personal data carefully. GA4 doesn't allow personally identifiable information, so your User-ID can't be an email address or anything comparable.
Always use your own randomly generated IDs.
Want to talk about this?