Two sessions instead of one - visitor ID and user ID

Hello,

I implemented user ID tracking - after login I send unique identifier via dataLayer. This part works as expected and I see the session in Matomo backend tracked with ID specified.

According How are requests with a user ID tracked?: “Any previously tracked action for this visitor before the user was logged in is also associated with this User ID. When a user logs in, Matomo counts all actions before and after logging in as one user, one visit, and one unique visitor.”

However in reporting backend I see that the original Visitor session doesn’t inherit the user ID after login and those two sessions are tracked separately. (screenshot)

  1. What could be the cause of this?
  2. Should these sessions be tracked as one immediately (real time report shall reflect that), or it takes some time to recalculate it?

Thank you.

Are you sure the visitor ID has not been changed between the two “sessions”?
When not logged, are all visited pages stored in the same session?

Do you mean having Matomo admin opened in browser can impact the reports?

But I run my visits and login in anonymout (private) mode it shouldn’t be impacted.

It seems that previous post was a spam…

@heurteph-ei I just tried with 2 completelly different browsers (Chrome and Canary)

browser 1: Chrome

  • opened anonymous browsing
  • logged into Matomo cloud admin
  • opened Real-time report

browser 2: Canary

  • opened anonymous browsing
  • opened tracked website - this was shown in Real-time report of admin (browser 1)
  • logged into website and browsed through some of the pages this was shown in Real-time report of admin (browser 1), but it created a separate entry in Real-time report

Can you share the 2 page view tracking HTTP requests sent by browser 2?

The developers are trying to reproduce this behavior now.

@nagyalex If you still have this issue, and if it matches, maybe you can add how to reproduce it here: https://github.com/matomo-org/matomo/issues/19927

1 Like