Skip to content

Conversation

@pmanna
Copy link

@pmanna pmanna commented Jan 22, 2015

  • Made the generic sendRequestWithParameters: public, in order to deal with special requests (like session start)
  • Added optional support for iOS 6
  • Added simple persistent storage for requests when offline: requests are stored on disk when app becomes inactive and re-queued when connection is available again

…l with special requests (like session start)

- Added optional support for iOS 6
- Added simple persistent storage for requests when offline
@emiliopavia
Copy link
Owner

Hi @pmanna, thanks for your contribution! I've considered to add persistency of requests when offline, but I've decided to skip it because Google Analytics automatically drops requests that are older than 4 hours, and maybe that complexity wasn't worth. Anyway I'll look at your implementation.

@pmanna
Copy link
Author

pmanna commented Jan 23, 2015

Thanks for your reply!
To explain the rationale behind it: I work for a newspaper publisher, and page views are not just a statistics tool, but the foundations on which the advertising work to evaluate performance, so anything that could be done to minimise the losses of data MUST be done, and persistence is a requirement.
We're actually ditching Google's own SDK precisely because we've found out that it throttles the output, discarding events when the queue is full, and this is not acceptable.
Besides, the issue you report is easily solved: just use the date the event is sent, not when it's queued. I know, not exactly right, still it doesn't really matters as long as the total number of events is the right one.

However, I'm going to change the code again to ensure all the events are actually queued, not just the failed ones: let me know if that could be interesting for you, otherwise I'll keep them in my fork.

Thank you again for your work on this matter, it spared me a few hours of coding!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants