Open ronan-hello opened 3 weeks ago
Here is the official preview feature of WordPress that allow support for this feature : https://wordpress.org/plugins/speculation-rules/ If WordPress include this feature in the next WP release, Matomo will crteate doublon for every pages. This is an important point for web performance.
Regards Ronan
What happened?
When a developer configures the preload/prerender function on his website in order to optimize the loading time of his pages, Matomo is triggered and counts the page (even though the page has not yet been displayed on the user's screen).
What should happen?
Matomo should handle preloading and not save the page view when the page has a preload or prerender request header. Tested with GA4 (it differentiates between classic page view and pre-rendered page view and does not follow pre-rendered page view).
How can this be reproduced?
Then you have :
1x page 1
2x page 2
1x page 3
Instead of :
1x page 1
1x page 2
Matomo should detect the header in preload request and disable data recoding in their database.
If you look for the preload script, here is a basic example you can copy and paste on your page :
PS: To be sure that preload is active on your browser, you can view preloaded URLs within Chrome Dev Tools (Application > Speculative loads)
Thank you Ronan HELLO
Matomo version
5.1.2
PHP version
8.3
Server operating system
Debian
What browsers are you seeing the problem on?
Chrome
Computer operating system
Windows and Mac
Relevant log output
No response
Validations