Closed notjosh closed 5 years ago
Hi @notjosh, thanks for the splendid bug report. I just checked on the "official demo server" to make sure this isn't a server installation or configuration issue and could see the same issue.
@mattab Do you know if this is a known issue? The iOS SDK currently passes the local time to the server using the h
, m
and s
parameter. Should we use the cdt
parameter as well?
Has there been any update to this behind the scenes? It might start being an issue for us soon(ish), so trying to keep our team in the loop.
Hey @notjosh, noting from my side to report. I have one thought though: We could simply try to add the cdt
parameter and check if that works. I'll try to provide a testing branch as soon as possible, but that could take as long as the end of the week. Feel free to patch one yourself if that's more critical to you.
🙌 That did the trick! I've opened a PR over at #301 if you want. Feel free to implement it yourself if you have different ideas!
(Sort of related, I found Prior Artâ„¢ of this issue, but on web over here, so the cdt
value is confirmed to be what we want).
This was implemented and will be part of the next release.
My "page visit time" generally looks like:
(where
dispatchInterval
is the default 30)I've confirmed locally it's sending the timestamps as we'd expect on each page view, but from what I can tell, the server uses its own time when the events are received to set the page visit time. When the events are batched, they all seem to get the same timestamp.
I saw #177, but I don't think that's the issue here. i.e. setting
dispatchInterval
to 1 gets me closer to what I want. Obviously that's got some battery implications though :(Is there any way to get the server to respect client timestamps from the clients? Any help/advice/thoughts?
Matomo server version: 3.9.1 matomo-sdk-ios version: 6.0.1