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

Javascript tracker: allow to set a HTTP timeout in seconds #9850

Closed
adhamshamkh opened this issue Feb 25, 2016 · 4 comments
Closed

Javascript tracker: allow to set a HTTP timeout in seconds #9850

adhamshamkh opened this issue Feb 25, 2016 · 4 comments
Labels
c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement. not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.

Comments

@adhamshamkh
Copy link

First thanks for the great work on PIWIK.

We are using a Javascript tracker, and are experiencing an issue when our network or servers are down/inaccessible for whatever reason. The issue is that the Google chrome browser highlights in the status bar (bottom left of browser) that the site is:

"Waiting for webanalytics.piwik-server.com......"

Whilst this doesn't impact the site majorly it's undesirable to have this message displayed for a long time (when a connection is made this flashes up very quickly and is not noticeable) and also shows the revolving icon in the header tab that shows the page is still doing something. Fiddler confirms that the requests runs for * 21 seconds* and then reports a timeout as below.

[Fiddler] The connection to 'webanalytics.piwik-server.com' failed.
Error: TimedOut (0x274c).
System.Net.Sockets.SocketException A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond XXX.XXX.XXX.XX:80

What I am hoping for is an option to set a request timeout somewhere of say 1 or 2 seconds,
in that time frame we can reasonably expect the tracking to have happened, if it hasn't then we are happy for the process to timeout. presumably this must be controlled from the javascript? Is there such an option?

If anybody could offer any suggestions i'd be really grateful!

Thanks in advance,
Adham

@tsteur tsteur added Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement. c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. labels Feb 25, 2016
@tsteur
Copy link
Member

tsteur commented Feb 25, 2016

Is this message shown for loading the piwik.js or for actually sending a tracking request?

In case of a tracking request: So far we do not set any timeout. Feel free to send us a PR that let's anyone configure a timeout, this would be useful. The call is done here: https://github.com/piwik/piwik/blob/2.16.1-b1/js/piwik.js#L3198-L3217

@mattab
Copy link
Member

mattab commented Mar 31, 2016

@adhamshamkh

try also to:

@mattab mattab closed this as completed Mar 31, 2016
@mattab mattab added the answered For when a question was asked and we referred to forum or answered it. label Mar 31, 2016
@mattab mattab changed the title Javascript tracker - Connection Timeout Javascript tracker: allow to set a HTTP timeout in seconds Mar 31, 2016
@mattab mattab reopened this Mar 31, 2016
@mattab mattab added this to the Mid term milestone Mar 31, 2016
@mattab mattab removed the answered For when a question was asked and we referred to forum or answered it. label May 27, 2016
@theoponros
Copy link

Hi, what Adham is suggesting would be really useful ("an option to set a request timeout somewhere of say 1 or 2 seconds") for us as well, is there any code for this we could use?

Cheers and thanks for a great software!
Pontus

@mattab
Copy link
Member

mattab commented Dec 10, 2023

Thanks for contributing to this issue. As it has been a few months since the last activity and we believe this is likely not an issue anymore, we will now close this. If that's not the case, please do feel free to either reopen this issue or open a new one. We will gladly take a look again!

@mattab mattab closed this as not planned Won't fix, can't repro, duplicate, stale Dec 10, 2023
@sgiehl sgiehl added the not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. label Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement. not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

No branches or pull requests

5 participants