Depending on what types of browsers you configure. Are they for standalone HTML5 web applications?
If they support ononline and onoffline events , you can implement this yourself quite trivially.
Some potentially workable code using standalone events, local JSON storage, and HTML5:
if(!localStorage.getItem("offlineGA")){ localStorage.setItem("offlineGA","[]"); } var _ogaq = { push : function(arr){ if(navigator.onLine || !("onLine" in navigator)){ // if online or if browser doesn't support onLine/offLine detection. _gaq.push(arr); } else{ var stored = JSON.parse(localStorage.getItem("offlineGA")); stored.push(arr); localStorage.setItem("offlineGA", JSON.stringify(stored)); } } }; $(window).bind("online", function(){ // if you don't have jQuery, you can do window.ononline instead _gaq.push( JSON.parse(localStorage.getItem("offlineGA")) ); localStorage.setItem("offlineGA","[]"); //empty it });
Then you just use _ogaq as a wrapper for _gaq .
t
_ogaq.push(["_trackEvent","Category", "Action"]);
Yahel
source share