Posting events when browser is in background

I posted this in the ‘plugins’ topic but the more I explore it, the more I think it’s a support/bug situation. Read on…

We’ve noticed that if you have, say a polling event which you set up a javascript interval timer to fire every minute, whilst it works correctly when the browser is in focus, as soon as you’ve got another tab open, the interval timer still fires but the Piwik event tracking call never goes out.

I wrote some code in the function which fires every interval to do some other tasks aside from just firing the event and whilst the tab is in the background, those tasks do complete. It’s just the piwik event that doesn’t.

Does Piwik do a check to see whether the window has the focus, before firing an event tracking call? If it does - can that be disabled (and how). If it doesn’t, is there another way to force the call to happen.

When I first looked into it, I thought it was something to do with the browser I was using (Firefox) perhaps limiting or crippling the background resources but the fact that the other task were being completed, leads me to believe this is a Piwik quirk.

If anyone has any ideas on this one, I’d really appreciate it