-
Notifications
You must be signed in to change notification settings - Fork 733
Offline Caching #358
Comments
👍 |
1 similar comment
👍 |
This seems to work in the iOS library, so I'm assuming there is some way of sending an event at a later time with an appropriate timestamp. In order to simplify things, we should simply have an API ourselves that allows us to specify the timestamp of the event and handle offline caching at the application level (i'd rather not have the library touch localStorage or any other resources that the application is using) |
This is definitely something we're interested in doing, it's not supported atm though. We'll keep this open and come back to it soon. |
@lancejpollard- ideally using localstorage to persist events across reloads would be optional or there would be some way to manage how much resources we can reserve in localstorage for this purpose. In the meantime, we've found that simply adding the 'time' parameter to the object representing a tracked event allows us to populate events within mixpanel retroactively :) |
👍 |
Hello, I am looking for the same thing for my webkit desktop app, which runs even if the user has no connection. In the meantime I did a simple js wrapper over the HTTP API that does that : https://github.com/hereismass/osjs |
Also the Quick Start snippet does not handle cases where a web app is started without an internet connection. if(window.navigator.connection && window.Connection && window.navigator.connection.type == window.Connection.NONE){
document.addEventListener('online', function(){
// Include Analytics.js script tag
})
} I understand that we don't especially want to add an overhead for everybody. |
+1 for this, would really make sense to make it part of the the package |
Integrations are responsible for queueing events themselves - there's no way for the analytics library to be able to know that Mixpanel's SDK delivered the event while Amplitude's didn't (note that Amplitude's js library does it's own queueing as well for this reason). As for Segment itself, we've added retries when sending data to Segment segment-integrations/analytics.js-integration-segmentio#23. This is currently behind a flag and must be opted in, but we'll probably make it the default soon. |
I looking for an analytics solution for a Cordova/Phonegap app. I cannot assume the user to be connected to the internet at all times, so I need some sort of caching when offline. Does this lib support that?
The text was updated successfully, but these errors were encountered: