-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
New visit not created after logout #15293
New visit not created after logout #15293
Comments
Since Matomo 3.12 or 3.13 a reset or login of the userId no longer creates a new visit since it is technically not a new visit. You may be able to create new visit by calling this: _paq.push(['appendToTrackingUrl', 'new_visit=1']); // (1) forces a new visit
_paq.push(["deleteCookies"]); // (2) deletes existing tracking cookies to start the new visit
// the two lines must be above the call to track* function
_paq.push(["trackPageView"]); |
Thanks for the quick reply. |
fix matomo-org/matomo#15293 cc @mattab can you have a look?
Created a PR 👍 |
Thanks!. |
I suppose you want event tracking maybe? https://matomo.org/docs/event-tracking/ Hard to say would need to know more. Best to ask these question in our forum: https://forum.matomo.org/ |
* Update docs since resetUserId no longer creates new visit fix matomo-org/matomo#15293 cc @mattab can you have a look? * we also force a new visit to be created for the pageviews after logout * we make sure to not again create a new visit afterwards (important for Single Page Applications) Got the idea from matomo-org/matomo#14739 (comment) Co-authored-by: Matthieu Aubry <mattab@users.noreply.github.com>
FYI, In our application we are using UserId feature.
I am setting below attributes when user clicks on logout button in our Application.
_paq.push(['resetUserId']);
_paq.push(['trackPageView']);
But, when the user logs back new visit is not created for the user with same UserId.
Please let me know, what is wrong here?
The text was updated successfully, but these errors were encountered: