Skip to content

Instantly share code, notes, and snippets.

@tomgibara
Created May 18, 2011 04:05
Show Gist options
  • Save tomgibara/977973 to your computer and use it in GitHub Desktop.
Save tomgibara/977973 to your computer and use it in GitHub Desktop.
Example of using GoogleAnalyticsTracker wrapper
// example analytics
GoogleAnalyticsTracker gat = GoogleAnalyticsTracker.getInstance();
gat.start(/* your analytics parameters */);
// example config
Tracker tracker = new Tracker(gat);
tracker.setAsynchronous(true);
tracker.disable(Tracker.Category.NET);
//example usage
tracker.trackActivityView("/dashboard");
tracker.trackUIEvent(Tracker.UIAction.CLICK, "okay");
tracker.trackNetEvent(Tracker.NetAction.UPLOAD, url, 2048);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment