1

This question is for the new version of Google Analytics (GA). So this is for v2, not v1. I just released v1.01 of my app and everything was going smoothly. I am trying to implement something for v1.1 that I have no idea how to do right now and I am crawling through it right now and crashing my app left and right during the development. The next morning when GA updated I saw that the Crashes/Exceptions graph, which was always 0, was up to 25! But I assume that was just me during development yesterday.

My question is how to disable GA during development/testing so it does not skew my GA graphs.

Matt
  • 3,882
  • 14
  • 46
  • 89

1 Answers1

0

For v2 (legacy)

In your analytics.xml add the follownig line,

<bool name="ga_debug">true</bool>

Doing it programatically,

// Get singleton using application context.
GoogleAnalytics myInstance = GoogleAnalytics.getInstance(this);

// Enable debug mode.
myInstance.setDebug(true);

Reference for v2 here


For v3

Google has rolled out a newer version for the SDK v3 in which there is dryRun flag which needs to be set for testing and debugging.

GoogeAnalytics.getInstance(this).setDryRun(true);

Reference for v3 here

Sudhir Mishra
  • 578
  • 2
  • 16