【问题标题】:Firebase remote config with audience does not work带有观众的 Firebase 远程配置不起作用
【发布时间】:2017-01-19 00:17:01
【问题描述】:

以下是我创建基于自定义受众的远程配置条件所遵循的步骤 -

  1. 首先我创建了一个名为 OEM 的用户属性

  1. 我创建了一个动态链接,utm_sourcegoogle-micromax

    https://d83j2.app.goo.gl/?link=http://myapp.in&apn=com.myapp.app&utm_source=google-micromax&utm_medium=micromax_device&utm_campaign=promo_google_micromax

  2. 我创建了一个OEM-Micromax 受众,条件是用户属性OEM 包含google-micromax

  1. 然后我根据 Micromax 受众创建了一个远程配置条件

  1. 然后我处理动态链接并将用户属性设置为从链接的utm_source返回的值

    AppInvite.AppInviteApi.getInvitation(mGoogleApiClient, this, autoLaunchDeepLink)
    .setResultCallback(
    new ResultCallback<AppInviteInvitationResult>() {
      @Override
      public void onResult(AppInviteInvitationResult result) {
        if (result.getStatus().isSuccess()) {
          //First time user
          if (StorageHelper.getBooleanObject(StorageHelper.FIRST_TIME_USER, true)) {
    
            Intent intent = result.getInvitationIntent();
            String deepLink = AppInviteReferral.getDeepLink(intent);
            Uri uri = Uri.parse(deepLink);
            String utm_source = uri.getQueryParameter("utm_source");
            FirebaseEvents.setUserProperty(utm_source);
    
            StorageHelper.setBooleanObject(StorageHelper.FIRST_TIME_USER, false);
          }
          FirebaseEvents.logEventInvite(true);
        }
      }
    });
    
  2. 现在,当我从远程配置中获取 oem_admob_banner_unit_id 参数时,它仍然返回 默认 值,而不是 Micromax 受众的值。

我做错了什么?

【问题讨论】:

    标签: ios firebase firebase-dynamic-links firebase-remote-config


    【解决方案1】:

    不确定这是否与您的问题有关,但我也无法让受众驱动的远程配置工作。 (我碰巧是基于应用程序事件/参数的受众,所以情况有点不同,但可能是类似的问题)。在我通过反复触发我的事件迫使观众中有足够多的用户之后,它终于开始工作了。不知道有多少,大概10个左右。

    【讨论】:

    • 嗨艾伦,感谢您的回复。您是否必须从 10 种不同的设备将用户添加到受众群体中,还是您必须从单个设备中添加?
    • 我使用了 1 台设备来执行此操作。我在 iOS 和 Android 应用程序(安装、触发事件、卸载、重复)上都这样做了。我是根据这个 SO 答案做的,它似乎是准确的:stackoverflow.com/a/37529141/1973199
    【解决方案2】:

    获取后,你应该调用

    FIRRemoteConfig - (BOOL)activateFetched
    

    将获取的配置数据应用于活动配置,从而更新行为和外观 应用的生效时间(取决于应用中配置数据的使用方式)。

    如果有一个 Fetched Config 并且它被激活,则返回 true。

    如果没有找到 Fetched Config,或者 Fetched Config 已经激活,则返回 false。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-06-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-04-03
      • 2016-09-28
      • 2019-08-23
      相关资源
      最近更新 更多