예제 #1
0
  public static AnalyticsTracker getInstance(Context ctx) {
    AnalyticsTracker tracker = new AnalyticsTracker();
    tracker.ctx = ctx;

    if (!ContextUtils.isStableBuild(ctx)) {
      return tracker;
    }

    tracker.gat = GoogleAnalyticsTracker.getInstance();
    tracker.gat.startNewSession(ACCOUNT_UA, DISPATCH_INTERVAL_SEC, ctx);

    return tracker;
  }
예제 #2
0
 public void stopSession() {
   if (!ContextUtils.isStableBuild(ctx)) {
     return;
   }
   gat.stopSession();
 }
예제 #3
0
 public void trackPageView(String pageView) {
   if (!ContextUtils.isStableBuild(ctx)) {
     return;
   }
   gat.trackPageView(pageView);
 }
예제 #4
0
 public void trackEvent(String source, String action) {
   if (!ContextUtils.isStableBuild(ctx)) {
     return;
   }
   gat.trackEvent(source, action, "", -1);
 }
예제 #5
0
 public void clearTransactions() {
   if (!ContextUtils.isStableBuild(ctx)) {
     return;
   }
   gat.clearTransactions();
 }
예제 #6
0
 public void addItem(Item item) {
   if (!ContextUtils.isStableBuild(ctx)) {
     return;
   }
   gat.addItem(item);
 }
예제 #7
0
 public void addTransaction(Transaction transaction) {
   if (!ContextUtils.isStableBuild(ctx)) {
     return;
   }
   gat.addTransaction(transaction);
 }