有没有一种方法可以吸引开发人员构建的受众? [英] Is there a way to create an audience of developer builds?

查看:62
本文介绍了有没有一种方法可以吸引开发人员构建的受众?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在Firebase Analytics中将应用程序版本"设置为包含'调试'"来吸引受众.我的应用程序的调试版本在版本名称字符串的末尾附加了"-debug".

I've tried to make an audience in Firebase Analytics, with "App Version" set to "contains 'debug'". The debug version of my app appends "-debug" on the end of the Version Name string.

但是,当我运行该应用程序时,虽然Firebase记录了我的会话数据,但它并没有记录调试观众"的任何数据.

When I run the app, though, while Firebase records data for my sessions, it does not record any for the "debug audience."

我最终希望达到的世界是可以使用Remote Config,创建可以在测试中使用的配置项,但是我不必担心在按入时在某些测试模式下意外使config处于活动状态该应用程序上线.现在,我的解决方案是使用"if(!BuildConfig.DEBUG)"包装所有调用以应用Remote Config,但是我肯定会忘记一次,并为所有用户启用"isPremiumUser"设置为true的应用程序,或类似的愚蠢的东西:).

What I ultimately hope to get to is a world where I can use Remote Config, creating config items that I can use in testing, but I wouldn't have to worry about accidentally leaving config active in some test mode when I push the app live. Right now, my solution is to wrap all calls to apply Remote Config with "if (!BuildConfig.DEBUG)", but I'm sure to forget once, and push an app live with "isPremiumUser" set to true for all users, or something dumb like that :).

是否可以通过版本名称或任何其他方法来吸引开发人员构建的受众?

Is there a way to create an audience of developer builds, whether by version name, or any other method?

谢谢!

推荐答案

您可以为此使用Firebase Analytics用户属性( iOS文档).

You could use Firebase Analytics user properties for this (Android docs, iOS docs).

Android示例:

Android example:

if (BuildConfig.DEBUG) {
    mFirebaseAnalytics.setUserProperty("debug_build", "true");
}

您还需要转到Firebase控制台并执行以下两项操作:

You will also need to go to the Firebase console and do two things:

  1. 分析->用户属性->新用户属性-> "debug_build"
  2. 分析->受众->新受众->为您的受众命名,并将条件设置为用户属性,其中debug_build = "true"
  1. Analytics -> User Properties -> New User Property -> "debug_build"
  2. Analytics -> Audiences -> New Audience -> name your audience and set condition to user property where debug_build = "true"

现在,在远程配置"中,您可以根据新创建的受众设置条件.

Now in Remote Config you can set up conditions based on the newly created audience.

一些注意事项:

  • 一旦用户在某个受众群体中,他们将永远在该受众群体中,因此,即使您停止设置该属性,该用户仍将成为调试受众群体的一部分
  • 最多只能有50个用户和25个用户属性,因此您要牺牲其中一些用于调试版本

这篇关于有没有一种方法可以吸引开发人员构建的受众?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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