Report tracking into wrong Site ID #12922
Labels
Enhancement
For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Milestone
We often see users tracking traffic into no longer existing siteIds or siteIds that never existed.
In #7550 we already have an issue to report back tracking errors. As this is quite a big project, I think it would be valuable to start with some more simple use case.
When a site is being tracked into a website that doesn't exist anymore (we could have the highest siteId as option and check if
$trackedSiteId < $highestSiteId
). If so, we could report this in some way to the super user (as the site no longer exist it cannot be reported to any admin or view user).FYI: I wouldn't show it for
$trackedSiteId > $highestSiteId
as you could send lots of random requests to users every day annoying them by getting notifications about wrong requests and bloating tracker cache etc.The question is where to store this info efficiently and where to show it.
Regarding storing: We could store it in a simple table or option table or something. To minimize DB requests during tracking we would have in cache
highestSiteId
and all currently wrong tracked siteIds. This way we hit the DB only once per site.We would maybe reset the list of "wrong tracked siteIds" daily or weekly. It would be also good to store along this info at what time we received the first wrong tracking request for that site and on which URL.
Regarding showing the notice: Not sure. Maybe weekly we could send a summary mail if there is one or multiple siteIds still in use? In the admin we could maybe have a screen for this under diagnostics and maybe a notification if data is tracked into a wrong siteId?
The text was updated successfully, but these errors were encountered: