Huang Atlas
Huang Atlas

Reputation: 41

AB testing config applied but firebase console show 0 users

I've configured firebase ab-testing. Everything works fine except there is no impact user on console.

Actually, I can see UI and log show ab-testing is applied. Moreover, by checking the other StackoverFlow topic, activateFetched also invoked after fetch successfully.

Moreover, I've referenced

  1. Firebase Remote Config A/B testing shows no results after 24 hours
  2. Firebase Remote Config results on initial request
  3. Remote Config A/B Test does not provide results on iOS

But those are no work on my case. Is there anything miss or any other need to check so that client can response AB testing result to firebase console.

Thanks for your help first.

Code snippet:

    [FIRApp configure];

    FIRRemoteConfigSettings* configSettings = [[remoteConfig configSettings] initWithDeveloperModeEnabled:YES];
    [[FIRRemoteConfig remoteConfig] setConfigSettings:configSettings];

    [[FIRRemoteConfig remoteConfig] fetchWithExpirationDuration:duration completionHandler:^(FIRRemoteConfigFetchStatus status, NSError *error) {

        if (status == FIRRemoteConfigFetchStatusSuccess) {
            BOOL configFound = [[FIRRemoteConfig remoteConfig]  activateFetched];

Upvotes: 4

Views: 2744

Answers (2)

Aditi Gupta
Aditi Gupta

Reputation: 31

Please call the functions in the following order:

  1. fetch()
  2. Call activatefetched() in the completion handler of fetch().
  3. Fire activation event. If you need to call activation event immediately after activatefetched(), add a time delay of a few seconds. This is because activatefetched() process asynchronously and hence the function may not execute completely, before the activation event is fired.

Once done, test a running experiment on test device. In the debug logs search with string "exp_X" where 'X' is the experiment Id. You will find the experiment Id in the URL of the experiment. If you find the experiment ID in the debug logs while executing the code on test device, it means the device was covered in experiment. Also if the experiment setup is correct, the running experiment will show 1 active experiment user in the console.

Upvotes: 1

Richie Foreman
Richie Foreman

Reputation: 342

A couple things to check or take note of:

  • Make sure you're using and have deployed the latest Remote Config SDK. Earlier versions don't work with A/B test experiments.
  • Be sure to verify your experiment on a test device by following the documentation here
  • It can take a couple days for data to come in for your experiment.

Upvotes: 1

Related Questions