Skip to content

mbppower/offlineGA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

offlineGA

Offline Google Analytics support

Enable Google Universal Analytics tracking for native Cordova/Web apps.
When the app is offline the calls are stored in localStorage and then synchronized when the device is online.
Use the _ogaq function as you would do with standard ga function;
In the Analytics dashboard configure your tracking for Web not Native App

Example:

var _ogaq = new offlineGA();
_ogaq('create', 'UA-XXXXXXXX-X', 'auto');
_ogaq('set', 'checkProtocolTask', null); // Disable file:// protocol checking.
_ogaq('set', 'checkStorageTask', null); // Disable cookie checking, use this if your webview doesn't support cookies
_ogaq('send', 'pageview', '/app/my/page'); // Send page view.

About

Offline Google Analytics support

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages