matomo-php-tracker icon indicating copy to clipboard operation
matomo-php-tracker copied to clipboard

How to know if site ID or auth token are incorrect

Open acelaya opened this issue 1 year ago • 1 comments

I have been testing this SDK and in general it works well. However, I haven't found a way to tell if incorrect values were set for the site ID or auth token, as the response to $tracker->doTrackPageView(...) is always the same.

I have noticed the visit is not tracked by the server if any of those values is wrong (let's say you have a typo n the auth token, or the site ID is not known by Matomo server), but the method does not throw any exception or return a different result, so it could pass unnoticed for some time.

acelaya avatar Nov 21 '23 17:11 acelaya

How do you even know what your site id is? Mine is a string? But in your linked issue you have an int? Where can I find the site it?

mattvb91 avatar Dec 07 '23 14:12 mattvb91