-
Notifications
You must be signed in to change notification settings - Fork 83
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
doTrackPageView() return value unclear #85
Comments
@NicoHood Seems to be the case indeed. Feel free to add a PR to optionally throw an exception if an unexpected HTTP response code is returned. We'd be happy to merge that. |
Maybe it would make sense to implement #34 ? |
@NicoHood it might. Not sure an exception would be thrown in that case (haven't checked). |
What is the reason behind returning the response message? Is there anything useful to it? I am not sure what would be the best option (exception vs return type). However I think it should be handled equal for bulk requests. You should know best what to do. |
@NicoHood not sure what the reason behind it is (the project exists for a very long time). I know we can't simply start throwing exceptions by default (since it would break things for many users) but we can have an opt in for this to call a method like I can definitely see a benefit of an exception when a request fails compared to always the same response. |
https://developer.matomo.org/api-reference/PHP-Matomo-Tracker#dotrackpageview
To me it is not clear what the return value can be used for. It is just garbage for me and I have no option to tell if the call was successfull or not. There is no exception thrown or a good return value when the API key or site id is invalid. Any ideas how to get more feedback or clarify the docs?
The text was updated successfully, but these errors were encountered: