This repository has been archived by the owner on Dec 5, 2022. It is now read-only.
Add in support for queueing and retrying failed Google Analytics pings. #47
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
R: @ebidel @devnook
This adds in logic to queue and retry failed Google Analytics requests, similar to what's implemented in the public sample.
It also updates the
shed
library to the latest version. (See #46, which tracks getting the library added as a real dependency that could be pulled in and updated automatically.)Additionally, I added a wrapper library for IndexedDB, written by a Googler, Joshua Bell, and published in a gist. I need to reach out to him to figure out what his plansare with the library, and ideally we'd pull this in as an official dependency as well.
Longer term, I think I will refactor everything in
shed-offline-analytics.js
to be a standalone "plugin" library forshed
that we could then pull in as another dependency, but I want to speak to @wibblymat about that first, and figured getting the basic functionality reviewed and integrated into this project first made sense.