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

heartbeat ping with growing intervals #9423

Closed
hpvd opened this issue Dec 21, 2015 · 8 comments
Closed

heartbeat ping with growing intervals #9423

hpvd opened this issue Dec 21, 2015 · 8 comments
Labels
Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change. wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.

Comments

@hpvd
Copy link

hpvd commented Dec 21, 2015

to optimize informative value and lower server-load at the same time,
the possibility of a growing ping intervals of the heartbeat signal would be good.

(edit: @diosmosis has also proposed the main thought behind it in #8213, here it is again in a little more general way with more explanation why it's really needed and with a concrete example)

Use-case:
At the beginning of a one-page-visit it's very important to have very short intervals to understand why the visitor was leaving (especially on one single page visits)
But because of server-load, one could not keep this very short interval within complete visit where it is not needed anymore.

A) very short: only seen very first design impression could be the reason (or site does not load completely e.g. because of a blocker software and looks broken)

B) short: only headline, Image, first sentence could be the reason

C) middle: content was in general not that interesting to read everything / take action

D) long: got all information but takes no other action
e.g. because he got everything he was looking for
or even seeing/reading everything it was not motivating to take action...

=> One idea to set this up, is giving a second value
to the setting of the the default heart beat interval
( _paq.push(['enableHeartBeatTimer', 2]); )
which defines some kind of a growing factor which is multiplied to the interval used before.

the result could look like:
2015-12-21_12h04_23

@hpvd
Copy link
Author

hpvd commented Dec 21, 2015

to make it fast and easy:
make your own calculations which values are needed for your requirements,
by using attached the excel file from which the screenshot in the comment above was taken.
Piwik-variable-interval-for-heartbeat-ping.xlsx

@tsteur
Copy link
Member

tsteur commented Dec 21, 2015

Requirements for this kinda stuff can be very different for each user and I think as suggested here: #8213 (comment) and #8213 (comment) we should only allow a fix value and then an option JS callback so anyone can change the interval to it's need.

@hpvd
Copy link
Author

hpvd commented Dec 21, 2015

@tsteur thanks for pointing there. I opened this in a new ticket again (the one you are pointing to was closed somehow), to clarify the background why one need the possibility to have growing intervals.
If one can achieve this in a not to complicate way, having a fixed default value is fine too.
But as described, imho the possibility to use a growing interval is really important and make lots of sense - in almost all cases.

@tsteur
Copy link
Member

tsteur commented Dec 21, 2015

Yes, it's very important indeed. Especially for server load etc. Just saying instead of offering a fixed growing rate we need to let users customize it which makes it easier for us to implement and for users more flexible. Eg for online magazines etc they might want to send an interval during the first 30 seconds every second and then maybe every 2 or 3 seconds and then it increases maybe a bit faster

@hpvd
Copy link
Author

hpvd commented Dec 21, 2015

perfect. Was also talking about letting user set up a base value and a growing rate up to their needs... The shown table was only an example how it could be set up.
The more flexible the better (if still easy to use) :-)

@mattab mattab added this to the Mid term milestone Dec 23, 2015
@mattab mattab added the Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change. label Dec 23, 2015
@hpvd
Copy link
Author

hpvd commented Jan 5, 2016

another alternative way to lower number of necessary website to server contacts and with this server load is described here: #9475

@tsteur
Copy link
Member

tsteur commented Oct 24, 2019

Ideally, we only ping every say 5 or 10 minutes and otherwise ping if the user either leaves the window (blur event) or closes the tab. As we're now having sendBeacon the request should be pretty much always sent and this feature may not be needed anymore.

@tsteur
Copy link
Member

tsteur commented Oct 24, 2019

Closing this in favour of #15049

@tsteur tsteur closed this as completed Oct 24, 2019
@tsteur tsteur added the wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it. label Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change. wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.
Projects
None yet
Development

No branches or pull requests

3 participants