-
Notifications
You must be signed in to change notification settings - Fork 1
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
PHP tracking first page reload is slow #1
Comments
Hi @NicoHood, I have the same issue with PHP tracking. Had to deactivate the plugin, because it caused frequent downtimes. I'm not sure why matomo fails to process the request in a reasonable amount of time, but we could at least try to mitigate the issue. My preferred solution would also be an asynchronous request, but I don't know if there's a good way to do this in PHP. Probably with pthreads? The alternative would be to reduce the request timeout to a reasonably low value so that it won't crash the entire website. So maybe change |
I think this needs to be fixed upstream: matomo-org/matomo-php-tracker#88 I am using the javascript tracking on my site now, which is also available with this plugin. |
Grav does some magic here to provide an Anyway what do you think? Even without any upstream fixes, shouldn't that already solve the problem? If you think so, I can try writing a PR. |
That sounds nice, but does it work for you? Have you tested it? |
Haven't tested implementing this here in this plugin, but I have used This technique would obviously be incompatible with JavaScript tracking and it wouldn't be possible to output a blocking reason to JavaScript file anymore. Other than that, I don't think the plugin would need a lot of modification so maybe I'll just make a fork and give it a try. |
On a website with not much traffic the first page load in the morning takes a bit longer. Possible reasons:
This does not happen with the plugin disabled. It could be solved with an async task, as the execution of the tracking is not critical. But how to do that properly?
The text was updated successfully, but these errors were encountered: