[Feature Request] Allow to specify devices that shouldn't receive Demand ads (e.g. test farm devices)


#1

Hello!

When uploading an app to Play Store, it gets tested on Google’s test device infrastructure for a “Pre-launch report”. By testing it is usually meant that an automated script (aka Robo) performs random actions and clicks on an app. And naturally, some of those clicks land on the ad.

So far this hasn’t been a problem for me because I am yet to be approved for Marketplace. But in the further app updates, the test will be run again and will result in unwanted ad impressions and clicks, basically bot traffic. To avoid this, Google suggests that publishers set up their ad networks to filter out the IP’s of Google’s test devices and not serve Demand ads to those, but I haven’t found the possibility to do so in MoPub.

How should this situation be handled? As far as I know, pre-launch reports cannot be disabled. But I also don’t want to violate MoPub’s policies and be banned for inflating impressions and views.

Regards,
Paul


#2

Hello, here are two approaches that should help you:

  1. MoPub’s test ad unit IDs: While your app is tested against test farms, you can use our test ad unit IDs to prevent unwanted traffic. Then, you can use Firebase Remote Config to remotely reconfigure to production ad unit IDs when you are ready to go live.

  2. Backfill: While your app is tested, you can enable backfill. When you’re ready to go live, you can turn off backfill, and (re)enable MPX.


#3

Thanks for the suggestions. Those are workarounds though, each with some caveats:

  1. The first approach requires an extra dependency, even though it’s a small one.
  2. The backfill sounds good, however this will either mean serving backfill to real users for quite a while (since an update may take hours to process and it’s unknown when the pre-launch tests will run), or finding a reliable set of criteria that will only enable it for the test farm (e.g. a missing Play Store?).

Besides, both require manual actions each time an update is published and are prone to human error.

It would be awesome if you added some set-it-up-once solution eventually.


#4

Aaaand I just discovered this happened to me two days ago (on Apr 18). I published an internal test version to Google Play so that I could set up in-app purchases, and didn’t foresee that it would also trigger the test run. As a result, there were 17 impressions with 88% CTR, which I would like to report as false.

How do I report such impressions and clicks and ask them to be discarded as known bot traffic? Naturally I do not want those to be the reason to ban me from the platform :confused:


#5

Upd. Found this in Firebase Test Lab docs:
https://firebase.google.com/docs/test-lab/android-studio#modify_instrumented_test_behavior_for

It is possible to check programmatically if current device is a test lab device and modify behavior accordingly, e.g. load a test ad instead of an actual placement ID:

String adPlacementId = AD_PLACEMENT_ID;
// If in debug mode or on firebase test lab device, load a test ad instead
if (BuildConfig.DEBUG
        || "true".equals(Settings.System.getString(mActivity.getContentResolver(), "firebase.test.lab"))) {
    adPlacementId = "76a3fefaced247959582d2d2df6f4757";
}
mMoPubNative = new MoPubNative(mActivity, adPlacementId, this);