如何添加一个Android测试设备到Firebase? [英] How to add an android test device to Firebase?

查看:1148
本文介绍了如何添加一个Android测试设备到Firebase?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的android应用程序中集成了Firebase分析,但是我不能在文档或Google中看到如何添加测试设备,所以它不会计入统计信息。

我测试了很多,所以我的主要统计数据将被损坏,如果它计数我自己的事件



在admob我做

  AdRequest adRequest = new AdRequest.Builder()
.addTestDevice(AdRequest.DEVICE_ID_EMULATOR)
.addTestDevice(70A9E11F73EREFF712A1B73AE2BC2945)
.addTestDevice 1D18F0345E4C90E3625DB344BE64D02E)
.build();


解决方案

过滤器:

用户属性/ App Store +不包含+manual_install

我发现所有的直接应用安装,所有的Firebase测试实验室安装都属于这个参数。



如果你只想删除一些用户,那么你可以添加这个过滤器(还没试过): >
用户属性/用户ID +不等于(或不包含)+ your_ID



这仅适用于Firebase Analytics,观众创建后发生的事件。




对于BigQuery,我使用以下查询来排除测试设备:

  SELECT 
user_dim.user_id AS userId,
FORMAT_UTC_USEC(user_dim.first_open_timestamp_micros)AS tsFirstOpen,
user_dim .device_info.device_category AS dCaterogy,
user_dim.device_info.mobile_brand_name AS dBrand,
user_dim.device_info.device_model AS dModel2,
user_dim.device_info.platform_version AS dOSver,
user_dim.device_info.user_default_language AS dDefLanguage ,
user_dim.geo_info.continent AS geoCont,
user_dim.geo_info.country AS geoCounty,
user_dim.app_info.app_version AS appVer,

FROM
TABLE_DATE_RANGE(YOUR_TABLE_NAME.app_events_,TIMESTAMP('2016-06-23'),TIMESTAMP('2016-10-01'))
WHERE
//移除所有测试设备
NOT(user_dim .user_id ==YOUR_USER_ID或
user_dim.user_id ==YOUR_USER_ID)AND
NOT user_dim.app_info.app_store ==manual_installAND
user_dim.user_properties.key == first_open_time

GROUP BY
tsFirstOpen,
userId,
dCater ,
dBrand,
dModel2,
dOSver,
dDefLanguage,
geoCont,
geoCounty,
appVer
ORDER BY
appVer DESC,
tsFirstOpen DESC


I am integrating Firebase analytics in my android app but I cant see in documentation or google how I can add a test device so It doesn't count on stats.

I test a lot, so my main stats will be corrupted if it counts my own events

In admob I do

 AdRequest adRequest = new AdRequest.Builder()
            .addTestDevice(AdRequest.DEVICE_ID_EMULATOR)
            .addTestDevice("70A9E11F73EREFF712A1B73AE2BC2945")
            .addTestDevice("1D18F0345E4C90E3625DB344BE64D02E")
            .build();

解决方案

I solved it with a new audience in Firebase Console with filter:
User Properties / App Store + "does not contain" + "manual_install"

I figured it out that all direct app installs and also all Firebase Test Lab installs falls into this parameter.

If you want to remove only a few users then you could add this filter (haven't tried it):
User Properties / User ID + "not equal to" (or "does not contain") + your_ID

This only works in Firebase Analytics and only with events that happened after audience was created.


For BigQuery I use the following query to exclude the testing devices:

SELECT
  user_dim.user_id                                      AS userId,
  FORMAT_UTC_USEC(user_dim.first_open_timestamp_micros) AS tsFirstOpen,
  user_dim.device_info.device_category                  AS dCaterogy,
  user_dim.device_info.mobile_brand_name                AS dBrand,
  user_dim.device_info.device_model                     AS dModel2,
  user_dim.device_info.platform_version                 AS dOSver,
  user_dim.device_info.user_default_language            AS dDefLanguage,
  user_dim.geo_info.continent                           AS geoCont,
  user_dim.geo_info.country                             AS geoCounty,
  user_dim.app_info.app_version                         AS appVer,

FROM 
  TABLE_DATE_RANGE(YOUR_TABLE_NAME.app_events_, TIMESTAMP('2016-06-23'), TIMESTAMP('2016-10-01'))
WHERE
// Remove all testing devices
  NOT (user_dim.user_id == "YOUR_USER_ID" OR 
       user_dim.user_id == "YOUR_USER_ID") AND
  NOT user_dim.app_info.app_store == "manual_install"  AND
  user_dim.user_properties.key == "first_open_time"

GROUP BY
  tsFirstOpen,
  userId,
  dCaterogy,
  dBrand,
  dModel2,
  dOSver,
  dDefLanguage,
  geoCont,
  geoCounty,
  appVer
ORDER BY
  appVer DESC,
  tsFirstOpen DESC

这篇关于如何添加一个Android测试设备到Firebase?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆