Javascript tracker - Connection Timeout

Hi,

First thanks for the great work on PIWIK.:slightly_smiling:

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. Is there such an option? I have seen a method on the PHP version of the tracker called setRequestTimeout and have looked into HTTP.php to check if we could set any defaults globally but don’t think that would be the right approach.

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

Thanks in advance,
Adham

Hi. I suggest posting a feature request here. Core devs are not browsing the forums.

Thanks quba - have done :slight_smile: