Is `idvisitor` set uniquely based on `user_id`?

Hello. We’re trying to use user_id property on visits by calling _paq.push(['setUserId', 'USER_ID_HERE']); to identify visitors. But our analytic logic is based on property idvisitor in DB, not user_id. Can we expect that these idvisitor properties in DB will be always uniquely determined by user_id property? (so that visits with the same user_id will always have the same idvisitor? - we need that to count for example number of unique visitors)

Thanks for any help.

Hi @Aleksander

This depends on window_look_back_for_visitor configuration probably coupled with the use of cookie:

In my case (with no cookie), with high number of visits, I had to set window_look_back_for_visitor low and it seems visitor ID changes. Result: the unique visitor count differs from unique user count…