Skip to content
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

Ignore User ID or Visitor ID when either is set to 'undefined' or all zero UID #17471

Closed
Starker3 opened this issue Apr 19, 2021 · 7 comments
Closed
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.
Milestone

Comments

@Starker3
Copy link
Contributor

Summary

In some cases the tracking code implementation for tracking User IDs can be setup incorrectly or the application/tracking code is not able to correctly retrieve a device UID (In the case of apps)

In these situations the User ID may be set to undefined in the case of the standard javascript implementation and in some cases of mobile app implementation it may return the User ID as all zeros (For example 00000000-0000-0000-0000-000000000000)

Since the default setting in Matomo 4 is to overwrite Visitor ID (idvisit) with User ID this can potentially result in all visits being tracked under a single User ID and Visitor ID.

A perhaps easy solution for this would be to have Matomo ignore the User ID (And _id from the tracking request if the tracking request contains the same as the User ID) if it is undefined or some combination of all zeros (This can hopefully catch any combination of zeros and special characters such as - in the User ID when people are using device IDs for User ID)

@Starker3 Starker3 added the Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. label Apr 19, 2021
@tsteur
Copy link
Member

tsteur commented Apr 19, 2021

We ignore the userId for such visits on the cloud. Also for null, nil etc. But for On-Premise we don't do it just yet as it can be hard to debug and find out why something is not working. Eg you get a bug report userId feature not working etc vs you can see it that you have an error when undefined comes up in the userId report. It may be possible to use the tracking failure feature for this but it's not 100% the same because we wouldn't fail the request in that case but simply unset the userId.

@Starker3
Copy link
Contributor Author

Is there any sort of softfail for tracking? More like a warning than a total tracking failure?

@tsteur
Copy link
Member

tsteur commented Apr 19, 2021

Not really AFAIK. We could maybe in the user report add a footer message at some point and mention it if we notice some of those values that look faulty were detected. Most of the times, when undefined or something similar is used then the majority of visits have such a userId and it could be also seen likely in the report quite clearly anyway (obviously it's not super clear but saying it as it reduces the priority of the issue a bit).

@Starker3
Copy link
Contributor Author

@tsteur Okay, I understand.
Would it maybe be possible to log a warning when a User ID or Visitor ID is ignored if we do implement something like this instead of a tracking failure?

The main reason I'm thinking it might be a bit higher priority is there is no way to correct tracking data that is tracked with the incorrect User ID or Visitor ID(because User ID overwrites Visitor ID by default) which means all the tracking data sent with the incorrect data would basically be useless for a lot of reports.

I guess something like this could be setup as a Custom Alert though, which might be a much easier method.

@tsteur
Copy link
Member

tsteur commented Apr 19, 2021

@Starker3 we don't have any such logging in tracker method just yet unfortunately.

@tsteur
Copy link
Member

tsteur commented Apr 20, 2021

@Starker3 we could probably add this otherwise as a system check and look at eg last X days of data to see if this happens but then it may sometimes show up in the system report and then disappear again and then show up again whenever the bug happens. And once it's been fixed it would be still shown for a while and would only disappear after X days of fixing it. The logs itself wouldn't be too helpful likely as it would still take someone to look at these and that's not always possible/doable especially since file logging is not enabled by default and we also don't log in tracker just yet. If it's a permanent problem then it be likely directly visible in the UserID report (could add a footer message). Optionally, we could also show it in the system report indicating there may be a problem but it can be confusing.

Usually, we just "error" these tracking requests when unexpected data is past as this is the best way to make people aware there is a problem. If this happens to all userId requests then it would be quickly noticed likely but it may be hard to notice this when it only happens for a portion of the users so it might not be the best idea here.

Generally, we wouldn't really want to ignore these values though as someone might be wanting to track these values. For example someone might actually have the userId "undefined" I suppose. It's better making a problem visible rather than ignoring it automatically.

@tsteur tsteur modified the milestones: 4.4.0, 4.5.0 Apr 20, 2021
@tsteur tsteur added the wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it. label Jul 27, 2021
@tsteur
Copy link
Member

tsteur commented Jul 27, 2021

@Starker3 closing this one for now as wontfix. If users click on the userId report in the reporting menu then it's easily visible that there is a problem with the userId tracking.

@tsteur tsteur closed this as completed Jul 27, 2021
@mattab mattab modified the milestones: 4.7.0, 4.5.0 Aug 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.
Projects
None yet
Development

No branches or pull requests

3 participants