1

When using user-id feature in Google Analytics, does the userId need to be set in every session in order to tie sessions to the same user?

I see that there is a session unification option that connects page views from before userId is set to the same session, but haven't been able to find documentation about whether multiple sessions are unified to the same user without setting userId in each session.

For example, a new user navigates throughout the site, then submits a form, after which a unique id is generated and userId is set.

The next day, the same user returns to the site without performing any action to uniquely identify them.

Will this second session be tied to the same user when reporting on the user in Google Analytics?

1

No it wont be, it needs to be set via some kind of action (usually a site login or similar) that is able to identify that user and associate the correct userID with that user. You could send the userID along as a user scoped custom dimension, however this won't be present if they visit via a different device, or they clear their cookies.. until such times as they then login (or perform the designated action that sets the userID) again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.