Skip to content
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

Page view time often recorded as 0 seconds when batched #299

Closed
notjosh opened this issue Jun 28, 2019 · 5 comments · Fixed by #301
Closed

Page view time often recorded as 0 seconds when batched #299

notjosh opened this issue Jun 28, 2019 · 5 comments · Fixed by #301

Comments

@notjosh
Copy link
Contributor

notjosh commented Jun 28, 2019

My "page visit time" generally looks like:

  1. page 1: 0sec
  2. page 2: 0sec
  3. page 3: 0sec
  4. page 4: 30sec

(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

@brototyp
Copy link
Member

brototyp commented Jul 1, 2019

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?

@notjosh
Copy link
Contributor Author

notjosh commented Jul 15, 2019

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.

@brototyp
Copy link
Member

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.

@notjosh
Copy link
Contributor Author

notjosh commented Jul 16, 2019

🙌 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).

@brototyp
Copy link
Member

brototyp commented Sep 3, 2019

This was implemented and will be part of the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants