Randy
Randy

Reputation: 1136

Google Analytics in Android - filter out test device

Is there a way to make it so that my testing device doesn't report back on my Google Analytics when I open my Android app? I know with AdMob you can add test devices and those devices will load dummy ads. Is there something similar for Analytics on Android?

Upvotes: 4

Views: 2097

Answers (2)

Gavriel
Gavriel

Reputation: 19237

I know it's already answered, but IMHO that answer is incorrect.

According to: https://developers.google.com/analytics/devguides/collection/android/v2/advanced#opt-out putting the client in demo mode won't stop it sending data, it will just add debug info to LogCat. Instead you could use the setAppOptOut() explained in the same link.

Upvotes: 5

P.T.
P.T.

Reputation: 25177

You can put your analytics client in "debug" mode, so it won't send any data. (If you're using v2: see the official docs, if you're using v1: see the "Testing" section of this overview).

Alternatively, on the server side, you can have GA filter out clients based on domain or IP. See http://support.google.com/analytics/bin/answer.py?hl=en&answer=1033162

Upvotes: 2

Related Questions