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
Track a unique id for each pageview #10499
Conversation
Good idea and concept. as discussed, it will likely be useful in the future for some new functionality, and it will be useful already now for troubleshooting some complex tracking issues.
Sounds good! |
The tests should be fixed. Also issued PR for matomo-org/matomo-php-tracker#21 There is no system test for it yet to test it actually persists the idpageview. I can possibly add one as soon as the other PR is merged. Will need to see how to add a useful test as it simply uses the value from pv_id |
@tsteur it looks good, but (only) now I'm thinking: to save space, wouldn't be enough to store 8 chars instead of 16? twice as less overhead for this "extra" un-used field, would be beneficial. I could make the change if you want! |
It just increases the chance that we generate duplicates re 8 characters. maybe it works though if we later use it more like |
OK |
reduced it to 6 bytes, let me know if it looks good and I will rebase PR to it can be merged |
LGTM Needs to be documented as well in:
|
Rebased, added to dev changelog and created https://github.com/piwik/developer-documentation/pull/149/files |
Awesome @tsteur that's perfect! |
While debugging tracking requests on a server a while ago I thought it would be really useful to have a unique id in the tracking request for a specific pageview. We cannot easily grep access logs for visitorId etc as they are stored as binary in the DB etc. Also this would give us all requests for a specific user but not a specific tracking request.
This PR generates a new, unique pageview ID for each pageview. All tracking requests that are related to this pageview will use the same ID. This would eventually allow us to exactly know which events, impressions, etc were tracked during which pageview. Useful eg for visitor log but also for other potentially new reports in the future.
This is a proposal and therefore WIP and Needs review / RFC. If this is something we'd merge I'd finish the feature in terms of adding tests for the tracker etc. For now we would only collect the data but not really use it yet apart from debugging. Because we can likely not make any schema changes for a year or so after Piwik 3.0 is released I'm proposing it already now to have it in the DB and to already collect this data. So we could eventually use it.
What's the thoughts on this one?