New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update docs since resetUserId no longer creates new visit #320
Conversation
fix matomo-org/matomo#15293 cc @mattab can you have a look?
The doc still says: Although the code is:
Can we change the comment to |
Or should we actually maybe rather reset the Visitor ID, when |
@mattab I don't think that's a good idea. It's like then you can as well undo the entire change. Also AFAIK we are not doing this when you set a userId so it's not quite consistent behaviour. It would be kind of taking control out of the user if we always created a new visit then maybe... could be done though... but then you'd also need to create a new visit when setting a userId etc. |
@tsteur slightly tweaked to document how to force creating a new visit. |
…r Single Page Applications) Got the idea from matomo-org/matomo#14739 (comment)
also added another commit after reading matomo-org/matomo#14739 (comment) |
👍 i don't think that makes sense either. have to do both to associate the action with an entirely new context (w/o associating it w/ any userid). |
The point is consistent behaviour. Currently, we are not creating a new visit when someone logs in. So it be inconsistent to create a new visit when the user logs out. See #320 (comment) Behaviour should be either consistent where it creates a new visit on log in, and log out. Or not at all. |
But the docs here say we should create a new visit when logging someone out? Maybe I'm misreading the conversation on the ticket? |
@diosmosis Yes. I was initially creating this doc to mention it no longer creates a visit as this is what is implemented. It could be changed though to create a new visit on log in and log out. |
FYI: I've also changed the guide: from:
to:
|
FYI also made another change to call deleteCookies in https://github.com/matomo-org/developer-documentation/pull/325/files which is now consistent with https://matomo.org/faq/how-to/faq_187/ |
fix matomo-org/matomo#15293
cc @mattab can you have a look?