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
JS Tracker: new setPageViewId function to override the pageviewid and not have it auto generated #17655
Conversation
Hi @JE4GLE, thanks for taking the time to create this pull request! Currently the jslint tests are failing, I believe because the new method is not currently in the list here: https://github.com/matomo-org/matomo/blob/4.x-dev/js/piwik.js#L66. Would you be able to add it? |
build js |
Hmm, looks like the tracker javascript building workflow isn't working on this PR. I'll build it manually before merging. |
@JE4GLE Looks like this change would create a regression, actually. This could be fixed pretty easily by having another variable like |
@diosmosis My use case would be:
Unfortunately I don't quite understand, why the pageview ID would change during one page visit. In my understanding, the user visits a page and a pageview ID is generated, which will stay the same, until the user reloads the page or goes to another one. Anyways, here's your proposed change: |
After I guess if you're expecting only one pageview before a new page is loaded or the current page is reloaded, then I suppose you wouldn't be affected by this. |
The change looks good now and the build passes. Thanks again for taking the trouble to make the PR and apply fixes @JE4GLE! |
Description:
This Pull Request solves the issue mentioned in the following issue: #16942
It would allow for a combination of the PHP tracker (to track 100% of the PageViews) and the JavaScript tracker (to track screen size, plugins, …) by first generating a page view id on the PHP side and setting it after page generation using JavaScript.
Review