As the title suggests, what I need to do is track various user events - such as clicks, swipes, time spent on a page, etc. - in an various iOs/Android/Windows App.
These Apps are based on responsive HTML/CSS/JS and have a simple OS specific container. All data such as images, videos, etc. are self-contained in the Apps.
Characteristic for these Apps is, that sales staff will use iPads/Surface/Android Tablets to demonstrate features of products, spreadsheets, infomercials, etc. to possible clients. One key requirement of the client is that as soon as the tablet connects to the Internet, these Statistics data is pushed to a central Stats Service (or some sort of DB, etc.)
I was reading a bit about Googles' new Universal Analytics and implemented that in "Website Mode" to the HTML of the App. Supposedly it allows tracking offsite-behavior but in my test it only works as long as I am online.
I'm pretty sure I am not the first wanting to do something like this. What implementations can you recommend? I'd hope to get the Universal Offline-Stats up and running in favor of doing some custom messaging/cookie/flatfile based solution.
PS: the tutorials I have found on the interwebs weren't of too much help. either too complicated, not covering the offline part in depth or using being too blurry about this part...
Maybe I do need the iOs/Android SDKs by design to get that part working? What do I do about Windows Surface if so?
Everything in Universal Analytics works through the Measurement Protocol which, at the end of the day, is just HTTP requests to the GA backend. All of the GA tracking libraries out there (analytics.js for Web and the Android and iOS SDKs) are just sugar on top of the Measurement Protocol.
If you want to send data to GA, you're going to need to have network access. And if there's no network access, the requests will have to be queued and sent later. As far as I know, none of the tracking libraries fully support this (they may in the future), so unfortunately you may have to implement offline support yourself if it's a hard requirement.
As for Windows phones, like I said, there's always the Measurement protocol, so you should be able to send hits from any device that supports HTTP (even things like printers and TVs).
Note: If you're queuing the hits to be sent later, you'll need to record when they occurred and set the &qt (queue time offset) parameter in the Measurement Protocol request, otherwise the hit times will be off.